chore(deps): Update to arrow/parquet 59.2.0 - #24030
Conversation
| if let Some(hint) = metadata_size_hint { | ||
| inner = inner.with_footer_size_hint(hint) | ||
| }; | ||
| let location = partitioned_file.object_meta.location; |
There was a problem hiding this comment.
ParquetObjectReader is deprecated due to
| filename: String, | ||
| metadata: Arc<ParquetMetaData>, | ||
| inner: ParquetObjectReader, | ||
| object_store: Arc<dyn ObjectStore>, |
There was a problem hiding this comment.
this is arguable a nicer example now, as it avoids having to wrap the ParquetObjectReader
| let to_write = RecordBatch::try_from_iter(data).unwrap(); | ||
| let path = object_store::path::Path::from(format!("{file_num}.parquet").as_str()); | ||
| let object_store_writer = ParquetObjectWriter::new(Arc::clone(&store) as _, path); | ||
| let object_store_writer = BufWriter::new(Arc::clone(&store) as _, path); |
There was a problem hiding this comment.
ParquetObjectWriter was deprecated: apache/arrow-rs#10308
ParquetObjectWriter is a thin wrapper around BufWriter: https://docs.rs/parquet/latest/src/parquet/arrow/async_writer/store.rs.html#72-74
| options: Option<&'a ArrowReaderOptions>, | ||
| ) -> BoxFuture<'a, parquet::errors::Result<Arc<ParquetMetaData>>> { | ||
| self.inner.get_metadata(options) | ||
| let object_meta = self.partitioned_file.object_meta.clone(); |
There was a problem hiding this comment.
THe need for this replication is removed by unifying the structures, as I propose to do do in
|
|
||
| **Migration guide:** | ||
|
|
||
| If your [`AsyncFileReader`] implementation exists mainly to read from an |
There was a problem hiding this comment.
This will need to get updated if we merge this one first
| acc1 = merge(acc1, acc2)?; | ||
|
|
||
| assert_eq!(acc1.size(), 282); | ||
| assert_eq!(acc1.size(), 290); |
There was a problem hiding this comment.
… arrow spec (#10297)" (#10506) # Which issue does this PR close? N/A cc @Jefffrey and @rluvaton # Rationale for this change #10297 changed the default map field names from `keys`/`values` to `key`/`value` to match the Arrow spec. This is a good change to align with the spec, but it is a breaking change: it broke the DataFusion upgrade (apache/datafusion#24030) because data produced elsewhere (e.g. by other Arrow implementations) uses the old `keys`/`values` field names, causing schema mismatches such as: ``` InvalidArgumentError("Incorrect datatype for StructArray field \"metadata\", expected Map(\"entries\": non-null Struct(\"keys\": non-null Utf8, \"values\": Utf8), unsorted) got Map(\"entries\": non-null Struct(\"key\": non-null Utf8, \"value\": Utf8), unsorted)") ``` See discussion on #10297: #10297 (comment) We should hold the field name change for the next breaking release to minimize downstream churn on a minor release, rather than ship it in a minor release. # What changes are included in this PR? - Reverts b963ecf (#10297), restoring the default map field names to `keys`/`values` (plural). - Updates a test added by #10475 after #10297 merged # Are these changes tested? Existing tests. # Are there any user-facing changes? Yes: this reverts the default `MapFieldNames` back to `keys`/`values` (as it was prior to #10297), rather than `key`/`value`. The intent is to reapply #10297 as part of the next breaking release.
e0fe024 to
f19d7ce
Compare
| "entries", | ||
| DataType::Struct(Fields::from(vec![ | ||
| Field::new("key", DataType::Int32, true), | ||
| Field::new("key", DataType::Int32, false), |
There was a problem hiding this comment.
this is necessary due to MapArray becoming more strict in
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24030 +/- ##
==========================================
- Coverage 81.05% 81.05% -0.01%
==========================================
Files 1106 1106
Lines 380556 380542 -14
Branches 380556 380542 -14
==========================================
- Hits 308477 308459 -18
+ Misses 53861 53860 -1
- Partials 18218 18223 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ache#24036) ## Which issue does this PR close? - Related to apache#24030 - Related to apache/arrow-rs#9879 ## Rationale for this change Upstream arrow-rs is deprecating the ParquetObjectReader (see apache/arrow-rs#10308) Not using the deprecated code involves copying some code for each existing usage, and I found that `CachedParquetFileReader` and `ParquetFileReader` are almost the same ## What changes are included in this PR? 1. unify `ParquetFileReader` and `CachedParquetFileReader` 2. make the fields non `pub` ## Are these changes tested? Yes by CI ## Are there any user-facing changes? There are breaking API changes, though I think for the better (things are now encapsulated more)
3465b7d to
68d2b47
Compare
This comment has been minimized.
This comment has been minimized.
| self.inner.get_bytes(range) | ||
| let object_store = Arc::clone(&self.object_store); | ||
| let location = self.location.clone(); | ||
| async move { |
There was a problem hiding this comment.
this is basically the only code that the ParquetObjectReader was performing that we didn't already have
| partitioned_file.object_meta.location.as_ref(), | ||
| metrics, | ||
| ); | ||
| let store = Arc::clone(&self.store); |
There was a problem hiding this comment.
rather than wrapping an inner ParquetObjectReader the reader now implements the AsyncRead trait directly
| ] | ||
|
|
||
| [[package]] | ||
| name = "paste" |
There was a problem hiding this comment.
we did remove an old paste dependency 🎉
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The benchmark numbers don't look great 😬 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
68d2b47 to
299d264
Compare
|
run benchmarks |
The next run didn't show any difference, so I think the first run was just noise; I am rerunning just to be sure |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing alamb/update_arrow_59.2.0 (299d264) to 24483db (merge-base) diff Run configurationrun benchmark tpchResults will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing alamb/update_arrow_59.2.0 (299d264) to 24483db (merge-base) diff Run configurationrun benchmark tpcdsResults will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing alamb/update_arrow_59.2.0 (299d264) to 24483db (merge-base) diff Run configurationrun benchmark clickbench_partitionedResults will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing alamb/update_arrow_59.2.0 (299d264) to 24483db (merge-base) diff Run configurationrun benchmark tpchCPU Details (lscpu)Details
Resource Usagetpch — base (merge-base)
tpch — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing alamb/update_arrow_59.2.0 (299d264) to 24483db (merge-base) diff Run configurationrun benchmark tpcdsCPU Details (lscpu)Details
Resource Usagetpcds — base (merge-base)
tpcds — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing alamb/update_arrow_59.2.0 (299d264) to 24483db (merge-base) diff Run configurationrun benchmark clickbench_partitionedCPU Details (lscpu)Details
Resource Usageclickbench_partitioned — base (merge-base)
clickbench_partitioned — branch
File an issue against this benchmark runner |
|
Ok, my conclusion is that the performance is basically the same (as expected) with this new version of arrow, so this PR is now ready for review and merge |
|
Thank you @Jefffrey |
Which issue does this PR close?
59.2.0(July 2026) arrow-rs#9879Rationale for this change
Upgrade to latest arrow / parquet library
What changes are included in this PR?
Are these changes tested?
yes, by CI
Are there any user-facing changes?
Not yet