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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -1010,21 +1018,40 @@ class AstBuilder extends DataTypeAstBuilder
       // [EMPTY]
       query
     } else {
-      throw 
QueryParsingErrors.combinationQueryResultClausesUnsupportedError(ctx)
+      throw QueryParsingErrors.combinationQueryResultClausesUnsupportedError(
+        ctx, "ORDER BY/SORT BY/DISTRIBUTE BY/CLUSTER BY")
     }
 
     // WINDOWS
-    val withWindow = withOrder.optionalMap(windowClause)(withWindowClause)
+    val withWindow = withOrder.optionalMap(windowClause) {
+      withWindowClause
+    }
+    if (forPipeOperators && windowClause != null) {
+      throw QueryParsingErrors.combinationQueryResultClausesUnsupportedError(
+        ctx, s"WINDOW clauses within SQL pipe operators")

Review Comment:
   This doesn't really match `COMBINATION_QUERY_RESULT_CLAUSES`, shall we add a 
new error condition for it?



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