File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -282,9 +282,6 @@ tests:
282282- class : org.elasticsearch.oldrepos.OldRepositoryAccessIT
283283 method : testOldRepoAccess
284284 issue : https://github.com/elastic/elasticsearch/issues/115631
285- - class : org.elasticsearch.xpack.esql.analysis.AnalyzerTests
286- method : testMvAppendValidation
287- issue : https://github.com/elastic/elasticsearch/issues/115636
288285
289286# Examples:
290287#
Original file line number Diff line number Diff line change 5656import java .util .List ;
5757import java .util .Map ;
5858import java .util .Set ;
59+ import java .util .function .Function ;
5960import java .util .function .Supplier ;
6061import java .util .stream .Collectors ;
6162import java .util .stream .IntStream ;
@@ -1879,14 +1880,19 @@ public void testMvAppendValidation() {
18791880 Supplier <Integer > supplier = () -> randomInt (fields .length - 1 );
18801881 int first = supplier .get ();
18811882 int second = randomValueOtherThan (first , supplier );
1883+ Function <String , String > noText = (type ) -> type .equals ("text" ) ? "keyword" : type ;
1884+ assumeTrue (
1885+ "Ignore tests with TEXT and KEYWORD combinations because they are now valid" ,
1886+ noText .apply (fields [first ][0 ]).equals (noText .apply (fields [second ][0 ])) == false
1887+ );
18821888
18831889 String signature = "mv_append(" + fields [first ][0 ] + ", " + fields [second ][0 ] + ")" ;
18841890 verifyUnsupported (
18851891 " from test | eval " + signature ,
18861892 "second argument of ["
18871893 + signature
18881894 + "] must be ["
1889- + fields [first ][1 ]
1895+ + noText . apply ( fields [first ][1 ])
18901896 + "], found value ["
18911897 + fields [second ][0 ]
18921898 + "] type ["
You can’t perform that action at this time.
0 commit comments