Skip to content

Accept arrow 60 Metadata in the JSON field metadata test helper - #141

Merged
adriangb merged 1 commit into
datafusion-contrib:mainfrom
pydantic:metadata-helper-arrow-60
Sep 29, 2026
Merged

adriangb merged 1 commit into
datafusion-contrib:mainfrom
pydantic:metadata-helper-arrow-60

Conversation

@cetra3

@cetra3 cetra3 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

arrow 60 returns field metadata as &Metadata rather than &HashMap<String, String> (apache/arrow-rs#10075). DataFusion main is now on arrow 60 (apache/datafusion#25335), and against it the assert_json_field_metadata test helper no longer compiles.

The helper now takes any iterator of key/value pairs, which both &HashMap and &Metadata provide, so the tests build on arrow 59 and 60. There's no library change: json_field_metadata() still returns a HashMap, and Field::with_metadata accepts it on arrow 60 through Into<Metadata>.

Tested with cargo clippy --all-targets -- -D warnings and cargo test, both against the current DataFusion 55 release (arrow 59) and with datafusion patched to DataFusion main (arrow 60).

arrow 60 returns field metadata as `&Metadata` rather than `&HashMap<String, String>`
(apache/arrow-rs#10075), so `assert_json_field_metadata` no
longer compiled against DataFusion `main`. Take any iterator of key/value pairs,
which both types provide, so the tests build on arrow 59 and 60.
@codecov-commenter

codecov-commenter commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.78%. Comparing base (2538b69) to head (3de14b8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
- Coverage   93.05%   92.78%   -0.28%     
==========================================
  Files          18       18              
  Lines        1815     1815              
  Branches     1815     1815              
==========================================
- Hits         1689     1684       -5     
  Misses         70       70              
- Partials       56       61       +5     

☔ View full report in Codecov by Harness.
📢 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.

@adriangb
adriangb merged commit bb247cb into datafusion-contrib:main Sep 29, 2026
7 checks passed
@adriangb
adriangb deleted the metadata-helper-arrow-60 branch September 29, 2026 00:47
@adriangb adriangb mentioned this pull request Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants