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


##########
sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4:
##########
@@ -1502,8 +1502,11 @@ version
     ;
 
 operatorPipeRightSide
-    : selectClause
-    | whereClause
+    : selectClause windowClause?
+    // Note that the WINDOW clause is not allowed in the WHERE pipe operator, 
but we add it here in
+    // the grammar simply for purposes of catching this invalid syntax and 
throwing a specific
+    // dedicated error message.
+    | whereClause windowClause?

Review Comment:
   Why we only allow optional window clause after SELECT and WHERE?



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