wangyum commented on a change in pull request #31691:
URL: https://github.com/apache/spark/pull/31691#discussion_r591622615



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -588,6 +588,13 @@ object LimitPushDown extends Rule[LogicalPlan] {
     }
   }
 
+  private def isSupportPushdownThroughWindow(
+      windowExpressions: Seq[NamedExpression]): Boolean = 
windowExpressions.forall {
+    case Alias(WindowExpression(_: RankLike | _: RowNumberLike,
+        WindowSpecDefinition(Nil, _, _)), _) => true

Review comment:
       The window frame of RankLike and RowNumberLike is UNBOUNDED PRECEDING to 
CURRENT ROW.
   
https://github.com/apache/spark/blob/32a523b56fc329e858f3a463314c13e3710be5e0/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala#L514




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

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