test(amber): add unit tests for ArrowUtils#4758
Merged
Merged
Conversation
Closes apache#4751 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4758 +/- ##
============================================
+ Coverage 43.09% 43.20% +0.10%
Complexity 2037 2037
============================================
Files 957 957
Lines 34077 34077
Branches 3753 3753
============================================
+ Hits 14686 14723 +37
+ Misses 18620 18581 -39
- Partials 771 773 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated ScalaTest spec for ArrowUtils in workflow-core, covering Arrow ↔ Texera type/schema conversions (including the LARGE_BINARY metadata round-trip) and pinning two known conversion-contract divergences as documented “current behavior”.
Changes:
- Add unit tests for
toAttributeType/fromAttributeTypemappings, including unsupported-type failure behavior. - Add unit tests for
toTexeraSchema/fromTexeraSchema, including LARGE_BINARY preservation viatexera_typefield metadata. - Add a small test for the
bool2intimplicit conversion.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aglinxinyuan
approved these changes
May 3, 2026
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?
Adds scalatest coverage for
common/workflow-core/src/main/scala/org/apache/texera/amber/util/ArrowUtils.scala. The Arrow ↔ Texera type / schema converters had no dedicated spec.The
getTexeraTuple/setTexeraTuple/appendTexeraTuplerow-level helpers are intentionally out of scope for this PR — they need a realVectorSchemaRootand substantial Arrow scaffolding, and warrant a dedicated PR.Any related issues, documentation, discussions?
Closes #4751.
Two contract divergences are pinned in the spec with explanatory comments and filed separately as Bug issues: (1)
toAttributeType's catch-allcase 64 | _ => LONGcollapses every non-{16,32}-bit width onto LONG (including widths like 8 that are clearly not LONG), and (2)fromAttributeTypecollapsesSTRING,LARGE_BINARY, andANYonto the sameUtf8Arrow type —LARGE_BINARYis recovered via field metadata, butANYloses its distinction entirely on round-trip and surfaces asSTRING.How was this PR tested?
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (claude-opus-4-7)