ulysses-you commented on a change in pull request #32724:
URL: https://github.com/apache/spark/pull/32724#discussion_r643626088
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -1373,6 +1386,28 @@ class AdaptiveQueryExecSuite
}
}
+ test("SPARK-35585: Support propagate empty relation through project/filter")
{
+ withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true",
+ SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1") {
+ val (plan1, adaptivePlan1) = runAdaptiveAndVerifyResult(
+ "SELECT key FROM testData WHERE key = 0 ORDER BY key, value")
+ assert(findTopLevelSort(plan1).size == 1)
+ assert(findTopLevelSort(adaptivePlan1).isEmpty)
+
+ val (plan2, adaptivePlan2) = runAdaptiveAndVerifyResult(
+ """
+ |SELECT t1.key, count(*) FROM testData t1
Review comment:
ok done.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]