You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/05/02 02:05:58 UTC

[GitHub] [spark] wangyum commented on a change in pull request #32350: [SPARK-35231][SQL] logical.Range override maxRowsPerPartition

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



##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/CombiningLimitsSuite.scala
##########
@@ -150,6 +150,14 @@ class CombiningLimitsSuite extends PlanTest {
     )
   }
 
+  test("SPARK-35231: Eliminate LocalLimit if Range maxRowsPerPartition not larger than Limit") {
+    checkPlanAndMaxRowsPerPartition(
+      Range(0, 100, 1, 3).select().localLimit(34),
+      Range(0, 100, 1, 3).select(),
+      34
+    )

Review comment:
       Could we make the test more simple? For example:
   ```scala
   assert(Range(0, 100, 1, 3).maxRowsPerPartition === Some(34))
   assert(Range(0, 100, 1, 4).maxRowsPerPartition === Some(25))
   assert(Range(0, 100, 1, 3).select('id).maxRowsPerPartition === Some(34))
   ```




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org