fix: reject non-standard Int bit-widths in ArrowUtils#5030
Open
Ma77Ball wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
@chenlica can you assign a reviewer? |
Contributor
Author
|
/request-review @mengw15 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5030 +/- ##
============================================
- Coverage 42.78% 42.77% -0.02%
+ Complexity 2197 2194 -3
============================================
Files 1045 1045
Lines 39985 39985
Branches 4217 4216 -1
============================================
- Hits 17109 17104 -5
- Misses 21818 21823 +5
Partials 1058 1058
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
@mengw15 Please do the review. |
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 PR?
ArrowUtils.toAttributeType(and the mirror dispatch insetTexeraTuple) usedcase 64 | _ => LONGforArrowType.Int. The trailing_made the second arm a catch-all, so every Int width that was not 16 or 32 (e.g. 8,128) silently surfaced as
LONGrather than being rejected. This PR splits the alternation so 64 staysLONG, 16/32 stayINTEGER, and any other width throwsAttributeTypeException, matching how every other unsupportedArrowType is already handled in the same method.
Any related issues, documentation, or discussions?
Closes: #4760
How was this PR tested?
ArrowUtilsSpec(which previously documented the silent coercion and invited this fix) to assert thatInt(8)andInt(128)now raiseAttributeTypeException.sbt scalafmtAllclean.sbt "workflowCore/testOnly org.apache.texera.amber.util.ArrowUtilsSpec"expected to pass; operator-sideArrowUtilsSpeconly exercises widths 16/32/64 and is unaffected.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.7 in compliance with ASF