liuzqt commented on code in PR #46830:
URL: https://github.com/apache/spark/pull/46830#discussion_r1637008045
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AQEPropagateEmptyRelation.scala:
##########
@@ -34,11 +35,14 @@ import
org.apache.spark.sql.execution.joins.HashedRelationWithAllNullKeys
*/
object AQEPropagateEmptyRelation extends PropagateEmptyRelationBase {
override protected def isEmpty(plan: LogicalPlan): Boolean =
- super.isEmpty(plan) || (!isRootRepartition(plan) &&
getEstimatedRowCount(plan).contains(0))
+ super.isEmpty(plan) || plan.isInstanceOf[EmptyRelation] ||
Review Comment:
@cloud-fan we still need to check this explicitly. `getEstimatedRowCount`
only match for specific patterns. Before the change, the reason why it works is
because `super.isEmpty` explicitly match empty `LocalRelation`.
We can also match `EmptyRelation` in `getEstimatedRowCount` alternatively. I
don't have preference.
--
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]