mihailoale-db commented on code in PR #60749:
URL: https://github.com/apache/spark/pull/60749#discussion_r4641884244


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -4394,6 +4403,17 @@ class Analyzer(
         (resolved, other)
     }
 
+    /**
+     * The attributes defined by the Window nodes of this query block below 
`plan`, which
+     * ExtractWindowExpressions creates for the window functions of the SELECT 
list.
+     */
+    private def windowOutputs(plan: LogicalPlan): AttributeSet = plan match {
+      case w: Window => w.windowOutputSet ++ windowOutputs(w.child)
+      case p: Project => windowOutputs(p.child)

Review Comment:
   What about `Aggregate`?



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -4394,6 +4403,17 @@ class Analyzer(
         (resolved, other)
     }
 
+    /**
+     * The attributes defined by the Window nodes of this query block below 
`plan`, which
+     * ExtractWindowExpressions creates for the window functions of the SELECT 
list.
+     */
+    private def windowOutputs(plan: LogicalPlan): AttributeSet = plan match {
+      case w: Window => w.windowOutputSet ++ windowOutputs(w.child)
+      case p: Project => windowOutputs(p.child)
+      case f: Filter => windowOutputs(f.child)

Review Comment:
   Why `Filter`, it doesn't have its output?



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -4394,6 +4403,17 @@ class Analyzer(
         (resolved, other)
     }
 
+    /**
+     * The attributes defined by the Window nodes of this query block below 
`plan`, which
+     * ExtractWindowExpressions creates for the window functions of the SELECT 
list.

Review Comment:
   nit
   ```suggestion
        * `ExtractWindowExpressions` creates for the window functions of the 
SELECT list.
   ```



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