weiqingy commented on code in PR #2458:
URL: https://github.com/apache/auron/pull/2458#discussion_r3754041662
##########
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 addressing my comments above. Only one nit comment, nothing
further from me.
nit: with line 54 now `1`, this is the only remaining `100` in the test.
Does the upper bound still guard anything, or can it come off?
--
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]