[SPARK-58643][SQL] Require a constant create_if_missing in variant_set/try_variant_set - #57855
Closed
bojana-db wants to merge 1 commit into
Closed
[SPARK-58643][SQL] Require a constant create_if_missing in variant_set/try_variant_set#57855bojana-db wants to merge 1 commit into
create_if_missing in variant_set/try_variant_set#57855bojana-db wants to merge 1 commit into
Conversation
uros-b
approved these changes
Aug 8, 2026
Member
|
Thank you @bojana-db! |
uros-b
pushed a commit
that referenced
this pull request
Aug 8, 2026
…_set/try_variant_set` ### What changes were proposed in this pull request? Make the optional `create_if_missing` argument of `variant_set` (and `try_variant_set`) a constant-only argument. `VariantSet.checkInputDataTypes` now rejects a non-foldable `create_if_missing` with `DATATYPE_MISMATCH.NON_FOLDABLE_INPUT`. ### Why are the changes needed? `create_if_missing` is a mode flag that controls the operation's behavior, not per-row data, so it should be a constant. ### Does this PR introduce _any_ user-facing change? Yes, within the unreleased `master`/`branch-4.x` line only (`variant_set`/`try_variant_set` are new in 4.3.0 and not yet released; there is no change relative to any released Spark version). ### How was this patch tested? Unit tests. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code with Claude Opus 4.8 Closes #57855 from bojana-db/reject-non-foldable-flag-variant-set. Authored-by: bojana-db <bojana.zecevic@databricks.com> Signed-off-by: Uros Bojanic <221401595+uros-b@users.noreply.github.com> (cherry picked from commit bcd4120) Signed-off-by: Uros Bojanic <221401595+uros-b@users.noreply.github.com>
uros-b
pushed a commit
that referenced
this pull request
Aug 8, 2026
…_set/try_variant_set` ### What changes were proposed in this pull request? Make the optional `create_if_missing` argument of `variant_set` (and `try_variant_set`) a constant-only argument. `VariantSet.checkInputDataTypes` now rejects a non-foldable `create_if_missing` with `DATATYPE_MISMATCH.NON_FOLDABLE_INPUT`. ### Why are the changes needed? `create_if_missing` is a mode flag that controls the operation's behavior, not per-row data, so it should be a constant. ### Does this PR introduce _any_ user-facing change? Yes, within the unreleased `master`/`branch-4.x` line only (`variant_set`/`try_variant_set` are new in 4.3.0 and not yet released; there is no change relative to any released Spark version). ### How was this patch tested? Unit tests. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code with Claude Opus 4.8 Closes #57855 from bojana-db/reject-non-foldable-flag-variant-set. Authored-by: bojana-db <bojana.zecevic@databricks.com> Signed-off-by: Uros Bojanic <221401595+uros-b@users.noreply.github.com> (cherry picked from commit bcd4120) Signed-off-by: Uros Bojanic <221401595+uros-b@users.noreply.github.com>
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Make the optional
create_if_missingargument ofvariant_set(andtry_variant_set) a constant-only argument.VariantSet.checkInputDataTypesnow rejects a non-foldablecreate_if_missingwithDATATYPE_MISMATCH.NON_FOLDABLE_INPUT.Why are the changes needed?
create_if_missingis a mode flag that controls the operation's behavior, not per-row data, so it should be a constant.Does this PR introduce any user-facing change?
Yes, within the unreleased
master/branch-4.xline only (variant_set/try_variant_setare new in 4.3.0 and not yet released; there is no change relative to any released Spark version).How was this patch tested?
Unit tests.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code with Claude Opus 4.8