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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org