AngersZhuuuu commented on code in PR #46523:
URL: https://github.com/apache/spark/pull/46523#discussion_r1599275544
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AQEPropagateEmptyRelation.scala:
##########
@@ -82,6 +82,11 @@ object AQEPropagateEmptyRelation extends
PropagateEmptyRelationBase {
case _ => false
}
+ override protected def canPropagate(plan: LogicalPlan): Boolean = plan match
{
+ case LogicalQueryStage(_, _: BroadcastQueryStageExec) => false
Review Comment:
Done
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/PropagateEmptyRelation.scala:
##########
@@ -65,6 +65,8 @@ abstract class PropagateEmptyRelationBase extends
Rule[LogicalPlan] with CastSup
private def nullValueProjectList(plan: LogicalPlan): Seq[NamedExpression] =
plan.output.map{ a => Alias(cast(Literal(null), a.dataType),
a.name)(a.exprId) }
+ protected def canPropagate(plan: LogicalPlan): Boolean = true
Review Comment:
Done
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala:
##########
@@ -2772,6 +2778,30 @@ class AdaptiveQueryExecSuite
}
}
+ test("SPARK-48155: AQEPropagateEmptyRelation check remained child for join")
{
+ withSQLConf(
+ SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true") {
+ val (_, adaptivePlan) = runAdaptiveAndVerifyResult(
+ """
+ |SELECT /*+ BROADCAST(t3) */ t3.b, count(t3.a) FROM testData2 t1
Review Comment:
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.
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]