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

Uroš Bojanić reassigned SPARK-62358:
------------------------------------

    Assignee: Mihailo Aleksic

> Make lambda variable names in by-name Union resolution deterministic
> --------------------------------------------------------------------
>
>                 Key: SPARK-62358
>                 URL: https://issues.apache.org/jira/browse/SPARK-62358
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.1.0
>            Reporter: Mihailo Aleksic
>            Assignee: Mihailo Aleksic
>            Priority: Major
>              Labels: pull-request-available
>
> In this issue I propose to make the lambda variable names that ResolveUnion 
> generates for by-name unions (unionByName) deterministic. When unionByName 
> reorders or fills struct fields inside an array, ResolveUnion rewrites the 
> column with transform(arr, lambdafunction(...)) and names the lambda variable 
> with UnresolvedNamedLambdaVariable.freshVarName("x"), which reads a JVM-wide 
> counter. The same query therefore gets a different analyzed plan depending on 
> what ran before it in the JVM. Naming the variable after its nesting depth 
> (x_0, x_1, ...) makes the plan stable. That matters for golden files and for 
> the single-pass analyzer's dual-run plan comparison.



--
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