gengliangwang commented on code in PR #48413:
URL: https://github.com/apache/spark/pull/48413#discussion_r1803775992
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -1014,17 +1022,35 @@ class AstBuilder extends DataTypeAstBuilder
}
// WINDOWS
- val withWindow = withOrder.optionalMap(windowClause)(withWindowClause)
+ val withWindow = withOrder.optionalMap(windowClause) {
+ withWindowClause
+ }
+ if (forPipeOperators && windowClause != null) {
+ throw QueryParsingErrors.clausesWithPipeOperatorsUnsupportedError(
+ ctx, s"the WINDOW clause")
+ }
// OFFSET
// - OFFSET 0 is the same as omitting the OFFSET clause
+ val offsetClause = "OFFSET"
Review Comment:
nit: shall we put all the constant clauses into an object?
--
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]