spark icon indicating copy to clipboard operation
spark copied to clipboard

[SPARK-49976] [SQL] Disallow lambda functions from being clauses in CASE WHEN expressions

Open mihailoale-db opened this issue 1 year ago • 0 comments

What changes were proposed in this pull request?

Throw the exception from the proper place in code.

Why are the changes needed?

Lambda functions can only be used as arguments of a small list of functions and therefore should be disallowed when they are part of CASE WHEN clauses.

Does this PR introduce any user-facing change?

Yes, the error will be thrown from the parser instead of the analyzer.

How was this patch tested?

Added test.

Was this patch authored or co-authored using generative AI tooling?

Copilot.

mihailoale-db avatar Oct 15 '24 15:10 mihailoale-db