beliefer commented on code in PR #36295:
URL: https://github.com/apache/spark/pull/36295#discussion_r856159262
##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -2044,6 +2044,16 @@ class Dataset[T] private[sql](
Limit(Literal(n), logicalPlan)
}
+ /**
+ * Returns a new Dataset by skipping the first `m` rows and then taking the
followed `n` rows.
+ *
+ * @group typedrel
+ * @since 3.4.0
+ */
+ def limitAndOffset(n: Int, m: Int): Dataset[T] = withTypedPlan {
Review Comment:
https://github.com/apache/spark/pull/36319 move the check of Offset from
analysis to finsh analysis, so we can add `def offset(...)`.
##########
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala:
##########
@@ -2044,6 +2044,16 @@ class Dataset[T] private[sql](
Limit(Literal(n), logicalPlan)
}
+ /**
+ * Returns a new Dataset by skipping the first `m` rows and then taking the
followed `n` rows.
+ *
+ * @group typedrel
+ * @since 3.4.0
+ */
+ def limitAndOffset(n: Int, m: Int): Dataset[T] = withTypedPlan {
Review Comment:
https://github.com/apache/spark/pull/36319 moves the check of Offset from
analysis to finsh analysis, so we can add `def offset(...)`.
--
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]