wangyum commented on code in PR #36951:
URL: https://github.com/apache/spark/pull/36951#discussion_r903205911


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/LimitPushDownThroughWindow.scala:
##########
@@ -33,8 +33,9 @@ object LimitPushDownThroughWindow extends Rule[LogicalPlan] {
   // The window frame of RankLike and RowNumberLike can only be UNBOUNDED 
PRECEDING to CURRENT ROW.
   private def supportsPushdownThroughWindow(
       windowExpressions: Seq[NamedExpression]): Boolean = 
windowExpressions.forall {
-    case Alias(WindowExpression(_: RankLike | _: RowNumberLike, 
WindowSpecDefinition(Nil, _,
-        SpecifiedWindowFrame(RowFrame, UnboundedPreceding, CurrentRow))), _) 
=> true
+    case Alias(WindowExpression(r @ (_: RankLike | _: RowNumberLike), 
WindowSpecDefinition(Nil, _,

Review Comment:
   Just add `_: Rank | _: DenseRank | _: RowNumber | _: NTile ` to the allowed 
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