Update to arrow-rs main (arrow 60 pre-release testing) - #24366
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24366 +/- ##
==========================================
- Coverage 81.19% 81.18% -0.02%
==========================================
Files 1110 1110
Lines 388618 388612 -6
Branches 388618 388612 -6
==========================================
- Hits 315531 315487 -44
- Misses 54507 54534 +27
- Partials 18580 18591 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| use arrow::{ | ||
| array::AsArray, | ||
| datatypes::{DataType, Field}, | ||
| datatypes::{DataType, Field, Metadata}, |
There was a problem hiding this comment.
Arrow 60 introduces a new metadata type:
| arrow-data = { version = "59.2.0", default-features = false } | ||
| arrow-flight = { version = "59.2.0", features = [ | ||
| "flight-sql-experimental", | ||
| "flight-sql", |
There was a problem hiding this comment.
The flight-sql-experimental feature was renamed to flight-sql and the old alias has now been removed:
| memchr = "2.8.1" | ||
| num-traits = { version = "0.2" } | ||
| object_store = { version = "0.13.2", default-features = false } | ||
| object_store = { version = "0.14.1", default-features = false } |
There was a problem hiding this comment.
parquet on arrow-rs main now requires object_store 0.14:
| }; | ||
| use arrow::ipc::{ | ||
| convert::fb_to_schema, | ||
| convert::try_fb_to_schema, |
There was a problem hiding this comment.
fb_to_schema is deprecated in favor of the fallible try_fb_to_schema (same for the datasource-arrow changes):
| where | ||
| T: ArrowPrimitiveType, | ||
| StandardUniform: Distribution<T::Native>, | ||
| T: ArrowPrimitiveType<Native = i64>, |
There was a problem hiding this comment.
Arrow 60 upgraded to rand 0.10, so bench_util's StandardUniform bounds can no longer be stated from DataFusion's rand 0.9:
| Plan with Metrics | ||
| 01)SortExec: TopK(fetch=1), expr=[b@1 DESC], preserve_partitioning=[false], filter=[b@1 IS NULL OR b@1 > bd], metrics=[output_rows=1, output_batches=1, row_replacements=1] | ||
| 02)--DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/push_down_filter_parquet/topk_single_col.parquet]]}, projection=[a, b, c], file_type=parquet, predicate=DynamicFilter [ b@1 IS NULL OR b@1 > bd ], sort_order_for_reorder=[b@1 DESC], reverse_row_groups=true, dynamic_rg_pruning=eligible, pruning_predicate=b_null_count@0 > 0 OR b_null_count@0 != row_count@2 AND b_max@1 > bd, required_guarantees=[], metrics=[output_rows=4, output_batches=1, files_ranges_pruned_statistics=1 total → 1 matched, row_groups_pruned_statistics=1 total → 1 matched, row_groups_pruned_bloom_filter=1 total → 1 matched, page_index_pages_pruned=0 total → 0 matched, page_index_rows_pruned=0 total → 0 matched, limit_pruned_row_groups=0 total → 0 matched, batches_split=0, file_open_errors=0, file_scan_errors=0, files_opened=1, files_processed=1, num_predicate_creation_errors=0, predicate_evaluation_errors=0, pushdown_rows_matched=4, pushdown_rows_pruned=0, predicate_cache_inner_records=4, predicate_cache_records=4, scan_efficiency_ratio=21.62% (222/1.03 K)] | ||
| 02)--DataSourceExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/push_down_filter_parquet/topk_single_col.parquet]]}, projection=[a, b, c], file_type=parquet, predicate=DynamicFilter [ b@1 IS NULL OR b@1 > bd ], sort_order_for_reorder=[b@1 DESC], reverse_row_groups=true, dynamic_rg_pruning=eligible, pruning_predicate=b_null_count@0 > 0 OR b_null_count@0 != row_count@2 AND b_max@1 > bd, required_guarantees=[], metrics=[output_rows=4, output_batches=1, files_ranges_pruned_statistics=1 total → 1 matched, row_groups_pruned_statistics=1 total → 1 matched, row_groups_pruned_bloom_filter=1 total → 1 matched, page_index_pages_pruned=0 total → 0 matched, page_index_rows_pruned=0 total → 0 matched, limit_pruned_row_groups=0 total → 0 matched, batches_split=0, file_open_errors=0, file_scan_errors=0, files_opened=1, files_processed=1, num_predicate_creation_errors=0, predicate_evaluation_errors=0, pushdown_rows_matched=4, pushdown_rows_pruned=0, predicate_cache_inner_records=4, predicate_cache_records=4, scan_efficiency_ratio=21.94% (222/1.01 K)] |
There was a problem hiding this comment.
The scan_efficiency_ratio denominators shifted because the parquet files written by this test got ~15 bytes smaller: since apache/arrow-rs#9619 float/double statistics use IEEE 754 total order, which is not backwards compatible with old readers' signed comparison, so the writer no longer duplicates min/max into the deprecated Statistics min/max fields for floating point columns.
Verified by writing the same table with arrow 59.2 vs the pinned rev: 1027 bytes (footer thrift 686) vs 1012 bytes (footer thrift 668).
| } | ||
|
|
||
| impl DFHeapSize for Metadata { | ||
| fn heap_size(&self, ctx: &mut DFHeapSizeCtx) -> usize { |
There was a problem hiding this comment.
Could be simpler with nicer upstream API. Filed a ticket to track:
| .into_iter() | ||
| .collect(), | ||
| ), | ||
| Field::new("with_metadata", DataType::UInt64, true) |
There was a problem hiding this comment.
the new Metadata api is nicer to work with I think 😍
| match &mut intersected { | ||
| None => { | ||
| intersected = Some(metadata.clone()); | ||
| intersected = Some( |
There was a problem hiding this comment.
This should be nicer with an API like
| +---------------------+-----------+-----------------+------+------+ | ||
| | 212 | 0.parquet | 3642 | 0 | 2 | | ||
| | 212 | 1.parquet | 3642 | 1 | 2 | | ||
| | 216 | 0.parquet | 3620 | "0" | 2 | |
There was a problem hiding this comment.
| /// Note this is not a `HashMap` because `HashMap` does not provide | ||
| /// implementations for traits like `Debug` and `Hash`. | ||
| inner: Arc<BTreeMap<String, String>>, | ||
| inner: Metadata, |
There was a problem hiding this comment.
Changed the inner field to be Metadata (as it is now the same representation after apache/arrow-rs#10075)
Pin arrow/parquet crates to arrow-rs rev 901e69f913bb8a1738009218898959e8f4cd7ec8 via [patch.crates-io] until arrow 60.0.0 is released. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tore 0.14, etc) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fd4a74f to
70bd16a
Compare
Which issue does this PR close?
60.0.0(August 2026) arrow-rs#9880Rationale for this change
Test DataFusion against the latest arrow-rs
mainahead of the arrow60.0.0release, so we can find and fix any issues before the release is published.What changes are included in this PR?
flight-sql-experimentalfeature toflight-sql(renamed upstream)object_storeto0.14.1(required by parquet on arrow-rs main)We will comment inline where upstream changes required updates.
Are these changes tested?
By CI
Are there any user-facing changes?
No