You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jaceklaskowski (via GitHub)" <gi...@apache.org> on 2023/03/25 15:10:09 UTC

[GitHub] [spark] jaceklaskowski commented on a diff in pull request #39691: [SPARK-31561][SQL] Add QUALIFY clause

jaceklaskowski commented on code in PR #39691:
URL: https://github.com/apache/spark/pull/39691#discussion_r1148388391


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala:
##########
@@ -693,6 +693,19 @@ case class UnresolvedHaving(
     copy(child = newChild)
 }
 
+/**
+ * Represents unresolved qualify clause, It is turned by the analyzer into a Filter.

Review Comment:
   nit: QUALIFY (all uppercase) + "that becomes Filter after query analysis"



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1303,6 +1303,11 @@
       "Protobuf type not yet supported: <protobufType>."
     ]
   },
+  "QUALIFY_EXPRESSION_MUST_CONTAIN_WINDOW_FUNCTION" : {
+    "message" : [
+      "QUALIFY expression '<sqlExpr>' must contain a window function."

Review Comment:
   nit: `QUALIFY` is a clause so what this `expression` refers to?



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/unresolved.scala:
##########
@@ -693,6 +693,19 @@ case class UnresolvedHaving(
     copy(child = newChild)
 }
 
+/**
+ * Represents unresolved qualify clause, It is turned by the analyzer into a Filter.
+ */
+case class UnresolvedQualify(
+    qualifyCondition: Expression,
+    child: LogicalPlan)
+  extends UnaryNode {
+  override lazy val resolved: Boolean = false

Review Comment:
   lazy is not needed here, is 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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org