Vladan Vasić created SPARK-60614:
------------------------------------
Summary: Share scalar SQL variable assignment helpers
Key: SPARK-60614
URL: https://issues.apache.org/jira/browse/SPARK-60614
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 5.0.0
Reporter: Vladan Vasić
SET VARIABLE and FETCH INTO duplicate the same target-variable uniqueness check
and construct the same DUPLICATE_ASSIGNMENTS error independently.
Extract the shared validation into VariableAssignmentUtils, centralize the
existing error in QueryCompilationErrors, and update both analyzer rules to use
the shared helper.
Add a TableOutputResolver.resolveVariableOutputColumns overload accepting
resolved output attributes and an alias factory. This lets callers reuse
assignment casts without recursively reading LogicalPlan.output and lets the
single-pass resolver track aliases through its existing alias provider. Keep
the existing three-argument entry point and its behavior unchanged.
This is an internal refactor with no user-facing behavior change. It does not
add single-pass SET VARIABLE support.
Validation: Catalyst production compilation and its dependencies passed with
SBT 1.13.0, JDK 17, and Scala 2.13. Unit and integration tests have not been
run.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]