cloud-fan commented on code in PR #48047:
URL: https://github.com/apache/spark/pull/48047#discussion_r1757294893


##########
sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4:
##########
@@ -604,6 +604,7 @@ queryTerm
         operator=INTERSECT setQuantifier? right=queryTerm                      
          #setOperation
     | left=queryTerm {!legacy_setops_precedence_enabled}?
         operator=(UNION | EXCEPT | SETMINUS) setQuantifier? right=queryTerm    
          #setOperation
+    | left=queryTerm OPERATOR_PIPE operatorPipeRightSide                       
          #operatorPipeStatement

Review Comment:
   I'm not familiar with ANTLR enough. So this recursive parser rule matches 
the SQL string from the end? e.g. it finds the first `operatorPipeRightSide` 
from the end, and then tries to match a chain of pipe operators.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to