Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/11121#discussion_r52820485
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
---
@@ -91,6 +91,14 @@ abstract class LogicalPlan extends
QueryPlan[LogicalPlan] with Logging {
}
/**
+ * Returns the maximum number of rows that this plan may compute.
+ *
+ * Any operator that a Limit can be pushed passed should override this
function (e.g., Union).
+ * Any operator that can push through a Limit should override this
function (e.g., Project).
+ */
+ def maxRows: Option[Expression] = None
--- End diff --
how about returning `None` if the argument of `Limit` is non-literal
expression?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]