Skip to content

Upgrade to DataFusion 54 and arrow 58.3 - #62

Merged
friendlymatthew merged 2 commits into
datafusion-contrib:mainfrom
pydantic:df54
Jun 10, 2026
Merged

Upgrade to DataFusion 54 and arrow 58.3#62
friendlymatthew merged 2 commits into
datafusion-contrib:mainfrom
pydantic:df54

Conversation

@adriangb

@adriangb adriangb commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

What

Bumps datafusion-variant to DataFusion 54 and arrow 58.3:

  • datafusion / datafusion-sqllogictest 5354
  • arrow / arrow-schema / arrow-cast / parquet-variant* 58.158.3
  • Remove as_any from every ScalarUDFImpl impl — DataFusion 54 dropped as_any
    from the ScalarUDFImpl trait, so the overrides no longer compile (E0407). This
    extends the earlier removal to src/variant_contains.rs, which was added afterward.

Building against vanilla crates.io DataFusion 54.0.0 / arrow 58.3.0 compiles cleanly.

⚠️ Needs a maintainer decision — variant_get cast semantics changed

arrow 58.3's cast kernel became more permissive for numeric casts, which changes the
behavior of 3 variant_get tests (they currently still assert the old strict-NULL
behavior, so they fail):

Test Input → target Old (53 / 58.1) New (54 / 58.3)
test_bool_scalar_int_value_returns_null variant int 1Boolean NULL true
test_bool_scalar_variant_array_paths variant int 3 (count) → Boolean NULL true (index 1)
test_int_scalar_float_value_returns_null variant float 10.5Int64 NULL non-NULL (truncated)

String→bool (e.g. "alice"Boolean) still yields NULL, so only numeric→bool and
float→int changed.

@friendlymatthew — could you confirm whether the new permissive-cast behavior is desired?
If so I'll update these 3 test assertions to match; if strict-NULL should be preserved,
that needs a code change in the variant cast path. Left as draft pending your call.

🤖 Generated with Claude Code

friendlymatthew and others added 2 commits June 8, 2026 13:55
DataFusion 54 removed `as_any` from `ScalarUDFImpl` and bumped arrow to 58.3.
Bump the dependency requirements accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@adriangb
adriangb marked this pull request as ready for review June 8, 2026 22:15

@friendlymatthew friendlymatthew left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adriangb

@friendlymatthew
friendlymatthew merged commit 9e1c846 into datafusion-contrib:main Jun 10, 2026
1 of 3 checks passed
adriangb pushed a commit to pydantic/datafusion-variant that referenced this pull request Jun 10, 2026
These three tests (test_int_scalar_float_value, test_bool_scalar_int_value,
test_bool_scalar_variant_array_paths) were left asserting the old NULL
behavior in datafusion-contrib#62, but parquet-variant 58.3 already coerces numeric variants
(10.5 -> 10, nonzero -> true), so they fail on main. Update the expectations
to match the actual coercion behavior.

https://claude.ai/code/session_01H3jbXkVZam7VH5DpiXczBR
adriangb pushed a commit to pydantic/datafusion-variant that referenced this pull request Jun 10, 2026
The unit tests (test_int_scalar_float_value, test_bool_scalar_int_value,
test_bool_scalar_variant_array_paths) and the variant_get_bool / variant_get_int
sqllogictest files were left asserting the old NULL behavior in datafusion-contrib#62, but
parquet-variant 58.3 already coerces numeric variants (10.5 -> 10,
nonzero -> true). Update the expectations to match the actual coercion behavior
so the test suite passes on the current dependency versions.

https://claude.ai/code/session_01H3jbXkVZam7VH5DpiXczBR
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.

2 participants