Skip to content

Commit a03bee2

Browse files
committed
ESQL: Add METADATA _index to testMergeKeywordAndObject test
Relates to #138294
1 parent 2175fe3 commit a03bee2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/FieldExtractorTestCase.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,12 @@ public void testMergeKeywordAndObject() throws IOException {
787787
)
788788
);
789789

790-
Map<String, Object> result = runEsql("FROM test* | SORT file.raw | LIMIT 2");
790+
// Added the _index column to make sure no sneaky indices are added (see https://github.com/elastic/elasticsearch/issues/138294).
791+
Map<String, Object> result = runEsql("FROM test* METADATA _index | SORT file.raw | LIMIT 2");
791792
assertResultMap(
792793
result,
793-
List.of(unsupportedColumnInfo("file", "keyword", "object"), columnInfo("file.raw", "keyword")),
794-
List.of(matchesList().item(null).item("o2"), matchesList().item(null).item(null))
794+
List.of(unsupportedColumnInfo("file", "keyword", "object"), columnInfo("file.raw", "keyword"), columnInfo("_index", "keyword")),
795+
List.of(matchesList().item(null).item("o2").item("test2"), matchesList().item(null).item(null).item("test1"))
795796
);
796797
}
797798

0 commit comments

Comments
 (0)