ulysses-you commented on a change in pull request #35148:
URL: https://github.com/apache/spark/pull/35148#discussion_r780867318
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -1406,6 +1413,56 @@ class AdaptiveQueryExecSuite
}
}
+ test("SPARK-35442: Support propagate empty relation through aggregate") {
+ withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true") {
+ val (plan1, adaptivePlan1) = runAdaptiveAndVerifyResult(
+ "SELECT key, count(*) FROM testData WHERE value = 'no_match' GROUP BY
key")
+ assert(findTopLevelBaeAggregate(plan1).size == 2)
+ assert(stripAQEPlan(adaptivePlan1).isInstanceOf[LocalTableScanExec])
+
+ val (plan2, adaptivePlan2) = runAdaptiveAndVerifyResult(
+ "SELECT key, count(*) FROM testData WHERE value = 'no_match' GROUP BY
key limit 1")
+ assert(findTopLevelBaeAggregate(plan1).size == 2)
Review comment:
thank you @zinking , yes it should be plan2
--
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]