lyne7-sc commented on code in PR #2458:
URL: https://github.com/apache/auron/pull/2458#discussion_r3758309306
##########
spark-extension-shims-spark/src/test/scala/org/apache/auron/exec/AuronExecSuite.scala:
##########
@@ -43,6 +44,35 @@ class AuronExecSuite extends AuronQueryTest with
BaseAuronSQLSuite {
}
}
+ test("CollectLimit batches partition scans") {
+ withTempPath { path =>
+ spark.range(0, 80, 1, 8).write.parquet(path.getCanonicalPath)
+
+ withSQLConf(
+ SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false",
+ "spark.sql.files.maxPartitionBytes" -> "4096",
+ "spark.sql.limit.initialNumPartitions" -> "1") {
+ val df = spark.read.parquet(path.getCanonicalPath).where("id <
0").limit(1)
+ val collectLimit = collectFirst(df.queryExecution.executedPlan) {
+ case exec: NativeCollectLimitExec => exec
+ }.get
+ val numPartitions = collectLimit.child.execute().getNumPartitions
+ assert(numPartitions > 1 && numPartitions <= 100)
Review Comment:
Thanks for your review. removed the unnecessary upper bound.
--
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]