Skip to content

Commit 1f1fcf4

Browse files
committed
reorder branches
1 parent b3e8e6c commit 1f1fcf4

File tree

1 file changed

+4
-4
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session

1 file changed

+4
-4
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,10 +632,7 @@ private void preAnalyzeMainIndices(
632632
ThreadPool.Names.SEARCH_COORDINATION,
633633
ThreadPool.Names.SYSTEM_READ
634634
);
635-
if (preAnalysis.index() == null) {
636-
// occurs when dealing with local relations (row a = 1)
637-
listener.onResponse(result.withIndexResolution(IndexResolution.invalid("[none specified]")));
638-
} else {
635+
if (preAnalysis.index() != null) {
639636
String indexExpressionToResolve = EsqlCCSUtils.createIndexExpressionFromAvailableClusters(executionInfo);
640637
if (indexExpressionToResolve.isEmpty()) {
641638
// if this was a pure remote CCS request (no local indices) and all remotes are offline, return an empty IndexResolution
@@ -665,6 +662,9 @@ private void preAnalyzeMainIndices(
665662
})
666663
);
667664
}
665+
} else {
666+
// occurs when dealing with local relations (row a = 1)
667+
listener.onResponse(result.withIndexResolution(IndexResolution.invalid("[none specified]")));
668668
}
669669
}
670670

0 commit comments

Comments
 (0)