@@ -7759,7 +7759,6 @@ public void testLookupJoinFieldLoadingTwoLookups() throws Exception {
77597759 assertLookupJoinFieldNames (query , data , List .of (Set .of ("bar" , "baz" ), Set .of ("foo" , "bar2" , "baz2" )));
77607760 }
77617761
7762- @ AwaitsFix (bugUrl = "https://github.com/elastic/elasticsearch/issues/119082" )
77637762 public void testLookupJoinFieldLoadingTwoLookupsProjectInBetween () throws Exception {
77647763 assumeTrue ("Requires LOOKUP JOIN" , EsqlCapabilities .Cap .JOIN_LOOKUP_V12 .isEnabled ());
77657764
@@ -7788,7 +7787,7 @@ public void testLookupJoinFieldLoadingTwoLookupsProjectInBetween() throws Except
77887787 | LOOKUP JOIN lookup_index2 ON first_name
77897788 | DROP b*
77907789 """ ;
7791- assertLookupJoinFieldNames (query , data , List .of (Set .of ("foo" ), Set .of ("foo" )));
7790+ assertLookupJoinFieldNames (query , data , List .of (Set .of (), Set .of ("foo" )));
77927791
77937792 query = """
77947793 FROM test
@@ -7800,7 +7799,6 @@ public void testLookupJoinFieldLoadingTwoLookupsProjectInBetween() throws Except
78007799 assertLookupJoinFieldNames (query , data , List .of (Set .of ("baz" ), Set .of ("foo" , "baz2" )));
78017800 }
78027801
7803- @ AwaitsFix (bugUrl = "https://github.com/elastic/elasticsearch/issues/118778" )
78047802 public void testLookupJoinFieldLoadingDropAllFields () throws Exception {
78057803 assumeTrue ("Requires LOOKUP JOIN" , EsqlCapabilities .Cap .JOIN_LOOKUP_V12 .isEnabled ());
78067804
@@ -7841,7 +7839,7 @@ private void assertLookupJoinFieldNames(
78417839
78427840 assertEquals (expectedFieldNames .size (), fields .size ());
78437841 for (int i = 0 ; i < expectedFieldNames .size (); i ++) {
7844- assertEquals ( expectedFieldNames .get (i ), fields .get (i ));
7842+ assertThat ( fields .get (i ), equalTo ( expectedFieldNames .get (i ) ));
78457843 }
78467844 }
78477845
@@ -7920,10 +7918,14 @@ private List<Set<String>> findFieldNamesInLookupJoinDescription(LocalExecutionPl
79207918 var matcher = expected .matcher (line );
79217919 if (matcher .find ()) {
79227920 String allFields = matcher .group (1 );
7923- Set <String > loadedFields = Arrays .stream (allFields .split ("," ))
7924- .map (name -> name .trim ().split ("\\ {f}#" )[0 ])
7925- .collect (Collectors .toSet ());
7926- results .add (loadedFields );
7921+ if (allFields .isEmpty ()) {
7922+ results .add (Set .of ());
7923+ } else {
7924+ Set <String > loadedFields = Arrays .stream (allFields .split ("," ))
7925+ .map (name -> name .trim ().split ("\\ {f}#" )[0 ])
7926+ .collect (Collectors .toSet ());
7927+ results .add (loadedFields );
7928+ }
79277929 }
79287930 }
79297931
0 commit comments