File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed 
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -390,14 +390,16 @@ public void testAggsExpressionsInStatsAggs() {
390390            "1:19: grouping key [e] already specified in the STATS BY clause" ,
391391            error ("from test | stats e BY e = languages + emp_no" )
392392        );
393-         assertEquals (
394-             "1:19: grouping key [[q].[e]] already specified in the STATS BY clause" ,
395-             error ("from test | stats [q].[e] BY [q].[e]" )
396-         );
397-         assertEquals (
398-             "1:19: Cannot specify grouping expression [[q].[e]] as an aggregate" ,
399-             error ("from test | stats [q].[e] BY x = [q].[e]" )
400-         );
393+         if  (EsqlCapabilities .Cap .NAME_QUALIFIERS .isEnabled ()) {
394+             assertEquals (
395+                 "1:19: grouping key [[q].[e]] already specified in the STATS BY clause" ,
396+                 error ("from test | stats [q].[e] BY [q].[e]" )
397+             );
398+             assertEquals (
399+                 "1:19: Cannot specify grouping expression [[q].[e]] as an aggregate" ,
400+                 error ("from test | stats [q].[e] BY x = [q].[e]" )
401+             );
402+         }
401403
402404        var  message  = error ("from test | stats languages + emp_no BY e = languages + emp_no" );
403405        assertThat (
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ public void testQualifiersAreDisabledInReleaseBuilds() {
4646     * TODO: LOOKUP JOIN's qualifier will need to make it into the parsed plan node. 
4747     */ 
4848    public  void  testSimpleQualifierInExpression () {
49+         assumeTrue ("Requires qualifier support" , EsqlCapabilities .Cap .NAME_QUALIFIERS .isEnabled ());
50+ 
4951        String  query  = "ROW x = 1 | LOOKUP JOIN lu_idx AS qualified ON x | WHERE [qualified].[field]" ;
5052
5153        LogicalPlan  plan  = statement (query );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments