wangyum commented on a change in pull request #27477: [SPARK-30724][SQL] 
Support 'LIKE ANY' and 'LIKE ALL' operators
URL: https://github.com/apache/spark/pull/27477#discussion_r376235211
 
 

 ##########
 File path: 
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 ##########
 @@ -748,6 +748,7 @@ predicate
     | NOT? kind=IN '(' expression (',' expression)* ')'
     | NOT? kind=IN '(' query ')'
     | NOT? kind=RLIKE pattern=valueExpression
+    | NOT? kind=LIKE quantifier=(ANY | ALL) ('('')' | '(' expression (',' 
expression)* ')')
 
 Review comment:
   Otherwise it will throw `AnalysisException`:
   ```
   -- !query
   select company from like_any_table where company like any ()
   -- !query schema
   struct<>
   -- !query output
   org.apache.spark.sql.AnalysisException
   Invalid number of arguments for function any. Expected: 1; Found: 0; line 1 
pos 54
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to