cloud-fan commented on code in PR #44145:
URL: https://github.com/apache/spark/pull/44145#discussion_r1476028600
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InferWindowGroupLimit.scala:
##########
@@ -18,20 +18,24 @@
package org.apache.spark.sql.catalyst.optimizer
import org.apache.spark.sql.catalyst.expressions.{Alias, Attribute,
CurrentRow, DenseRank, EqualTo, Expression, GreaterThan, GreaterThanOrEqual,
IntegerLiteral, LessThan, LessThanOrEqual, Literal, NamedExpression,
PredicateHelper, Rank, RowFrame, RowNumber, SizeBasedWindowFunction,
SpecifiedWindowFrame, UnboundedPreceding, WindowExpression,
WindowSpecDefinition}
-import org.apache.spark.sql.catalyst.plans.logical.{Filter, Limit,
LocalRelation, LogicalPlan, Window, WindowGroupLimit}
+import org.apache.spark.sql.catalyst.plans.logical._
import org.apache.spark.sql.catalyst.rules.Rule
-import org.apache.spark.sql.catalyst.trees.TreePattern.{FILTER, WINDOW}
+import org.apache.spark.sql.catalyst.trees.TreePattern.{FILTER, LIMIT, WINDOW}
/**
* Inserts a `WindowGroupLimit` below `Window` if the `Window` has rank-like
functions
- * and the function results are further filtered by limit-like predicates.
Example query:
+ * and the function results are further filtered by limit-like predicates or
cumulative
Review Comment:
```suggestion
* and the function results are further filtered by limit-like predicates or
an actual limit.
```
--
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]