dongjoon-hyun commented on a change in pull request #28043: [SPARK-31280][SQL]
Perform propagating empty relation after RewritePredicateSubquery
URL: https://github.com/apache/spark/pull/28043#discussion_r400600377
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -198,6 +198,8 @@ abstract class Optimizer(catalogManager: CatalogManager)
CheckCartesianProducts) :+
Batch("RewriteSubquery", Once,
RewritePredicateSubquery,
+ ConvertToLocalRelation,
+ PropagateEmptyRelation,
Review comment:
This fails at `checkBatchIdempotence` of `RuleExecutor`.
```
[info] 2020-03-30 19:00:21.097 - stderr> 20/03/30 19:00:21 INFO
TemporaryHiveUDFTest: Running a simple query on the table.
[info] 2020-03-30 19:00:21.198 - stderr> Exception in thread "main"
org.apache.spark.sql.catalyst.errors.package$TreeNodeException:
[info] 2020-03-30 19:00:21.198 - stderr> Once strategy's idempotence is
broken for batch RewriteSubquery
[info] 2020-03-30 19:00:21.198 - stderr> Aggregate [count(1) AS
count#15L] Aggregate [count(1) AS count#15L]
[info] 2020-03-30 19:00:21.198 - stderr> +- Aggregate [val#5]
+- Aggregate [val#5]
[info] 2020-03-30 19:00:21.198 - stderr> ! +- Project [val#5]
+- LocalRelation [val#5]
[info] 2020-03-30 19:00:21.198 - stderr> ! +- LocalRelation [key#4,
val#5]
[info] 2020-03-30 19:00:21.198 - stderr> , tree:
[info] 2020-03-30 19:00:21.198 - stderr> Aggregate [count(1) AS count#15L]
[info] 2020-03-30 19:00:21.198 - stderr> +- Aggregate [val#5]
[info] 2020-03-30 19:00:21.198 - stderr> +- LocalRelation [val#5]
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]