Skip to content

build: upgrade to arrow 59, DataFusion 55, and pyo3 0.29 - #8997

Draft
slachiewicz wants to merge 7 commits into
lance-format:mainfrom
slachiewicz:agent/arrow-59-datafusion-55
Draft

build: upgrade to arrow 59, DataFusion 55, and pyo3 0.29#8997
slachiewicz wants to merge 7 commits into
lance-format:mainfrom
slachiewicz:agent/arrow-59-datafusion-55

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Sep 4, 2026

Copy link
Copy Markdown

Status: draft — waiting on upstream releases, then rebase.
Maintainer direction: lance upgrades after geodatafusion and datafusion-python. Tracking: geoarrow-rs arrow-59 release (geoarrow/geoarrow-rs#1474) · datafusion-python 55.0.0 release (apache/datafusion-python#1696).

Moves the workspace, the Python crate, and the Java JNI crate from arrow 58 / DataFusion 54 / pyo3 0.28 to arrow 59.3 / DataFusion 55.0 / pyo3 0.29, so downstream consumers (hudi-rs, Ballista) can pick up lance crates without a second arrow copy. arrow-pyarrow 59.1 is the first release that accepts pyo3 0.29, which is why the three bumps move together.

  • geo dropped from lance default features (TODO): no published geoarrow release compiles against arrow 59 yet; restore when geoarrow ships one.
  • python/pyproject.toml still pins datafusion>=54,<55: test_table_provider.py fails until datafusion-python 55 is on PyPI.
Behaviour changes
  • EnforceDistribution was folded upstream into EnsureRequirements, which enforces sorting requirements as well as distribution. Lance's optimizer list now uses that rule.
  • with_new_children stays on every node as a shim forwarding to replace_children with ChildrenPropertiesMode::Recompute; DataFusion 55 still declares it as a required (deprecated) method.
  • LanceExecutionOptions::batch_size now goes through ConfigNonZeroUsize::try_new, so a zero batch size is an error instead of being accepted.
Verification
  • cargo check --workspace --tests --benches — clean, zero warnings.
  • cargo clippy --all --tests --benches -- -D warnings — only chunks_exact_to_as_chunks and drain_collect fire, new in rustc 1.98, in untouched files (CI pins 1.97).
  • cargo check --manifest-path python/Cargo.toml — clean after the PyCapsule::new_with_value migration.
  • Not run: cargo test --workspace, Java JNI check, Python lint/tests, cargo deny check, make licenses.
  • Lockfiles: only the arrow, DataFusion, and parquet families plus transitive crates moved.

This change was created with AI assistance.

parquet moves with arrow because DataFusion 55 requires parquet ^59.2 and
two arrow copies would split the array types. pythonize moves with pyo3
because 0.28 pinned pyo3 0.28 (links = python conflict). object_store stays
at 0.13.2, which DataFusion 55 still requires.
MutableArrayData::extend is deprecated for try_extend; FixedSizeBinaryArray
lost its From<Vec<_>> impls in favour of TryFrom; the record_batch! macro
re-export from datafusion::common is deprecated for arrow_array::record_batch.
Their version tracks the arrow major, as in the 57 to 58 bump (lance-format#6638).
…rrow 59

geoarrow-array/geoarrow-schema 0.8 pin arrow ^58 and geodatafusion 0.5 pins
datafusion ^54, so the geo feature cannot compile against arrow 59 from any
published release. Revert this commit once geoarrow 0.9 and a matching
geodatafusion ship.
Every ExecutionPlan node implements the new required apply_expressions and
the replace_children API; with_new_children remains as a shim that forwards
with ChildrenPropertiesMode::Recompute because DataFusion 55 still declares
it as a required (deprecated) method. partition_statistics implementations
move to child_stats_requests plus statistics_from_inputs, and callers use
StatisticsContext::compute. EnforceDistribution was folded upstream into
EnsureRequirements, which also enforces sorting requirements. UnionExec::new
became try_new, ExecutionOptions.batch_size became ConfigNonZeroUsize,
Partitioning gained a Range variant, and create_physical_expr takes a
PhysicalPlanningContext.
@github-actions github-actions Bot added A-python Python bindings A-index Vector index, linalg, tokenizer A-java Java bindings + JNI A-deps Dependency updates A-encoding Encoding, IO, file reader/writer A-namespace Namespace impls chore labels Sep 4, 2026
PyCapsule::new is deprecated in pyo3 0.29; the replacement takes the same
arguments.
…value

Fixes the previous commit, which did not compile: pyo3 0.29's replacement
takes a &'static CStr rather than Option<CString>.
@wjones127

wjones127 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
  • geo feature. geoarrow-array/geoarrow-schema 0.8 pin arrow ^58 and geodatafusion 0.5 pins datafusion ^54; neither has a release on arrow 59 (geoarrow-rs main has moved, geodatafusion main has not). Because geo is a default feature of the lance crate it cannot compile against arrow 59 from any published crate, so the last commit drops it from the defaults with a TODO. Either wait for those releases or ship this without geo in the defaults.
  • datafusion-python. PyPI has only datafusion 54.0.0 and python/pyproject.toml pins datafusion>=54,<55; the FFI table-provider test needs the Python package to match datafusion-ffi 55, so test_table_provider.py will fail until datafusion-python 55 ships.

Hi @slachiewicz, thanks for making a PR. In general, we wait for geodatafusion and datafusion-python to upgrade first be upgrading. If you want you can keep this PR up as a draft until that happens, and then we can rebase at that time.

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

Labels

A-deps Dependency updates A-encoding Encoding, IO, file reader/writer A-index Vector index, linalg, tokenizer A-java Java bindings + JNI A-namespace Namespace impls A-python Python bindings chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants