Repository navigation
refactor: share negative-scale decimal checks across Scala serdes - #7334
Draft
Abhishek-Mohan wants to merge 1 commit into
Draft
Abhishek-Mohan wants to merge 1 commit into
Abhishek-Mohan wants to merge 1 commit into
Conversation
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.
Which issue does this PR close?
Closes #7021.
Rationale for this change
Negative-scale decimal checks are repeated across the cast, arithmetic, and math serdes. Sharing the predicate and unsupported-native reason keeps those checks consistent while preserving each expression's existing execution route.
The decimal-to-string reason remains specific: it describes a configuration prerequisite and returns
Incompatiblewhen the legacy flag is disabled, rather than an unconditional lack of native support. This is the intentional exception to the issue's proposal for one reason everywhere.What changes are included in this PR?
isNegativeScaleDecimal(DataType)predicate and shared reason in theDataTypeSupportcompanion object.getUnsupportedReasonsmetadata.How are these changes tested?
Draft: compilation and runtime validation are pending. No Maven, Cargo, formatter, or local-CI runs have been performed. Local builds remain paused to coordinate shared caches.
Completed:
git diff --checkand static review of the six-file patch.Tests added or updated cover:
roundcodegen dispatch on a materialized negative-scale decimal column.Before marking ready: run compilation and formatting/lint checks,
CometExpressionSuite, andCometNativeCastSuite. Since this touches serdes, obtain arun-spark-4.1-testsverdict before queueing. Generated documentation output also remains unverified.Council review
Rounds: 2. These are static-review scores, conditional on pending compilation and runtime validation.
Round 1 identified two test lines exceeding the configured formatting width; both were wrapped. All round-2 reviewers reported no actionable findings. Interrupted review attempts were retried and are not counted as extra rounds.
AI assistance: implementation by Claude Opus 5.5, orchestration by GPT-6 Astra, and council review by the models above using the tstack workflow in T3 Code / OpenCode.