[
https://issues.apache.org/jira/browse/SPARK-62083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Uroš Bojanić resolved SPARK-62083.
----------------------------------
Resolution: Fixed
Issue resolved by pull request 60719
[https://github.com/apache/spark/pull/60719]
> Add golden tests for functions whose rewrite uses an argument twice
> -------------------------------------------------------------------
>
> Key: SPARK-62083
> URL: https://issues.apache.org/jira/browse/SPARK-62083
> Project: Spark
> Issue Type: Test
> Components: SQL, Tests
> Affects Versions: 5.0.0, 4.5.0
> Reporter: Johannes Ehls
> Priority: Minor
> Labels: pull-request-available
>
> Add golden test cases to scalar-subquery-select.sql for functions that are
> rewritten into an expression that references an argument more than once:
> {{nullif}}, {{between}} and {{decode}}. The arguments are scalar subqueries
> (also correlated), an aggregate, a window function and a lambda variable,
> with {{spark.sql.alwaysInlineCommonExpr}} on and off.
> With {{spark.sql.alwaysInlineCommonExpr=true}}, {{nullif(a, b)}} is rewritten
> to {{NullIfResult(EqualTo(a, b), a)}}, so the same resolved argument occurs
> twice in the replacement, and the single-pass resolver can resolve it a
> second time. The tests pin the results of these shapes so that changes to how
> the analyzer handles duplicated arguments are covered by golden files.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]