[ 
https://issues.apache.org/jira/browse/SPARK-45658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784567#comment-17784567
 ] 

Asif commented on SPARK-45658:
------------------------------

I also think that during canonicalization of DynamicPruningSubquery, the 
pruning key's canonicalization should be done on the basis of the enclosing 
Plan which contains the DynamicPruningSubquery Expression

> Canonicalization of DynamicPruningSubquery is broken
> ----------------------------------------------------
>
>                 Key: SPARK-45658
>                 URL: https://issues.apache.org/jira/browse/SPARK-45658
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.5.0
>            Reporter: Asif
>            Priority: Major
>              Labels: pull-request-available
>
> The canonicalization of (buildKeys: Seq[Expression]) in the class 
> DynamicPruningSubquery is broken, as the buildKeys are canonicalized just by 
> calling 
> buildKeys.map(_.canonicalized)
> The  above would result in incorrect canonicalization as it would not be 
> normalizing the exprIds relative to buildQuery output
> The fix is to use the buildQuery : LogicalPlan's output to normalize the 
> buildKeys expression
> as given below, using the standard approach.
> buildKeys.map(QueryPlan.normalizeExpressions(_, buildQuery.output)),
> Will be filing a PR and bug test for the same.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to