Deprecate FromArrowArray in favour of ArrowSession array imports - #8927
Deprecate FromArrowArray in favour of ArrowSession array imports#8927robert3005 wants to merge 6 commits into
Conversation
Merging this PR will regress 1 benchmark
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
2bdf0b7 to
154677c
Compare
154677c to
97e60f3
Compare
ff9c087 to
3c9fce8
Compare
3c9fce8 to
7b17f7f
Compare
4ece166 to
ffd3548
Compare
d8fe764 to
28f0451
Compare
28f0451 to
e4dd6aa
Compare
| DataType::ListView(_) => Self::from_arrow(array.as_list_view::<i32>(), nullable), | ||
| DataType::LargeListView(_) => Self::from_arrow(array.as_list_view::<i64>(), nullable), | ||
| DataType::FixedSizeList(..) => Self::from_arrow(array.as_fixed_size_list(), nullable), | ||
| DataType::Map(..) => Self::from_arrow(array.as_map(), nullable), |
There was a problem hiding this comment.
no Map anymore on the new impl
| dtype: DType, | ||
| } | ||
|
|
||
| impl ArrowArrayStreamAdapter { |
There was a problem hiding this comment.
I think this adapter should have a handle to the arrow session so it can use from_arrow_record_batch and carry the extension types instead of converting them to storage
Follow-up to #8918: `FromArrowArray` is now #[deprecated] and every usage is replaced with `ArrowSession` methods, making the session the authoritative Arrow array import path. - `ArrowSession` gains `from_arrow_array_nullable(&dyn Array, bool)` for imports with no Arrow `Field` in hand; nested fields still dispatch extension import plugins. - `ArrowImportVTable::from_arrow_array` now receives the `ArrowSession` so plugins convert storage through the session (uuid, geo, json, tensor, parquet-variant updated). - All consumers (datafusion, python, ffi, tui, bench, compat-gen, layout, facade doc snippet) migrated to `from_arrow_array` / `from_arrow_array_nullable` / `from_arrow_record_batch`. - `vx_array_from_arrow` now imports through the session using the FFI schema's field, so Arrow extension types round-trip. - `IntoArrowArray` was already deprecated and has no remaining users. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Robert Kruszewski <github@robertk.io>
…ions
- `ParquetVariant::from_arrow_variant{,_nullable}` take an `&ArrowSession`
threaded from vtables/kernels, so shredded storage children resolve
through the registered import plugins.
- `native_geometry_scalar_from_wkb` takes an `&ArrowSession`; vortex-duckdb
passes its crate session.
- `vx_array_from_arrow` takes a `const vx_session*` (header regenerated).
- Extract each `FromArrowArray` impl body into a named, invocable
`vortex_arrow::convert::from_arrow_*` function (primitive, decimal,
temporal, bytes, byte-view, boolean, struct, list, list-view,
fixed-size-list, null, dictionary, run-ends, dyn dispatch, record batch);
the deprecated trait impls are now thin shims so the trait can eventually
be deleted.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Array::from_arrow takes a Session; C header regenerated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Robert Kruszewski <github@robertk.io>
Two `ArrayRef::from_arrow` call sites landed on develop while this branch was open, so the rebase reintroduced deprecation warnings the PR exists to remove. Both read a whole Arrow `RecordBatch`, so they convert to `ArrowSession::from_arrow_record_batch`, matching the other migrated readers. Signed-off-by: "Robert Kruszewski" <robert@spiraldb.com>
e4dd6aa to
51b8065
Compare
Remove all usages of FromArrowArray and ToArrowArray in favour of using ArrowSession