Skip to content

fix: reject non-standard Int bit-widths in ArrowUtils#5030

Open
Ma77Ball wants to merge 3 commits into
apache:mainfrom
Ma77Ball:fix/AttributeTypeCollapse
Open

fix: reject non-standard Int bit-widths in ArrowUtils#5030
Ma77Ball wants to merge 3 commits into
apache:mainfrom
Ma77Ball:fix/AttributeTypeCollapse

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

ArrowUtils.toAttributeType (and the mirror dispatch in setTexeraTuple) used case 64 | _ => LONG for ArrowType.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 LONG rather than being rejected. This PR splits the alternation so 64 stays LONG, 16/32 stay INTEGER, and any other width throws AttributeTypeException, matching how every other unsupported
ArrowType is already handled in the same method.

Any related issues, documentation, or discussions?

Closes: #4760

How was this PR tested?

  • Updated the existing pin test in ArrowUtilsSpec (which previously documented the silent coercion and invited this fix) to assert that Int(8) and Int(128) now raise AttributeTypeException.
  • sbt scalafmtAll clean.
  • sbt "workflowCore/testOnly org.apache.texera.amber.util.ArrowUtilsSpec" expected to pass; operator-side ArrowUtilsSpec only 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

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

@chenlica can you assign a reviewer?

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

/request-review @mengw15

@github-actions github-actions Bot requested a review from mengw15 May 13, 2026 02:39
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.77%. Comparing base (5bff1b4) to head (06c3ff6).

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              
Flag Coverage Δ *Carryforward flag
access-control-service 39.53% <ø> (ø)
agent-service 33.72% <ø> (ø) Carriedforward from 1497806
amber 43.48% <100.00%> (-0.03%) ⬇️
computing-unit-managing-service 0.00% <ø> (ø)
config-service 0.00% <ø> (ø)
file-service 32.18% <ø> (ø)
frontend 34.04% <ø> (ø) Carriedforward from 1497806
python 88.87% <ø> (-0.03%) ⬇️ Carriedforward from 1497806
workflow-compiling-service 47.72% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chenlica
Copy link
Copy Markdown
Contributor

@mengw15 Please do the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArrowUtils.toAttributeType collapses non-{16,32}-bit Int widths to LONG

3 participants