[ 
https://issues.apache.org/jira/browse/SPARK-62405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-62405:
-----------------------------------
    Labels: pull-request-available  (was: )

> Mark the adaptive plans of dynamic pruning builds as subquery plans
> -------------------------------------------------------------------
>
>                 Key: SPARK-62405
>                 URL: https://issues.apache.org/jira/browse/SPARK-62405
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 5.0.0
>            Reporter: XiDuo You
>            Priority: Major
>              Labels: pull-request-available
>
> QueryExecution.prepareExecutedPlan(plan, context) prepares the auxiliary 
> adaptive plans of dynamic partition pruning builds through 
> InsertAdaptiveSparkPlan, whose apply always calls applyInternal(plan, false). 
> The resulting AdaptiveSparkPlanExec therefore carries isSubquery = false, 
> even though the caller already passes subquery = true to preparations for the 
> rule list.
> Two consequences when those plans are built 
> (dynamicPartitionPruning.reuseBroadcastOnly=false, or 
> broadcastProjection.enabled=true):
> - shouldUpdatePlan is !isSubquery && getExecutionId.exists(...), so these 
> plans publish SQLAdaptiveExecutionUpdate under the main query's execution id 
> even though only the root of the main query should update the UI plan. The 
> SQL UI can end up showing a pruning build plan instead of the query's plan.
> - requiredDistribution is computed with 
> AQEUtils.getRequiredDistribution(inputPlan) instead of the subquery's 
> Some(UnspecifiedDistribution). A build plan rooted at a user repartition then 
> keeps that layout unnecessarily.
> Construct the rule with isSubquery = true for these plans.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to