n-young commented on code in PR #60090:
URL: https://github.com/apache/spark/pull/60090#discussion_r4516229845


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -4935,19 +4963,48 @@ object ResolveUnresolvedHaving extends 
Rule[LogicalPlan] {
    *
    * Returns None unless the condition can be evaluated below every Window in 
the chain.
    */
-  private def insertFilterBeforeWindow(filter: Filter): Option[LogicalPlan] = 
filter.child match {
-    case project: Project =>
-      insertFilterBeforeWindow(filter.copy(child = project.child))
+  private def insertFilterBeforeWindow(filter: Filter): Option[LogicalPlan] = {

Review Comment:
   Addressed. The Scaladoc now documents both dispatch paths: the default path 
places HAVING below the complete SELECT-list window chain or leaves it above 
all of it, while the legacy path moves it below only the first contiguous 
Window run.



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