-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Update to arrow-rs main (arrow 60 pre-release testing) #24366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,7 +103,7 @@ arrow-avro = { version = "59.2.0", default-features = false, features = [ | |
| arrow-buffer = { version = "59.2.0", default-features = false } | ||
| arrow-data = { version = "59.2.0", default-features = false } | ||
| arrow-flight = { version = "59.2.0", features = [ | ||
| "flight-sql-experimental", | ||
| "flight-sql", | ||
| ] } | ||
| # Both codecs are required here to make sure that code paths like | ||
| # file-spilling have access to all compression codecs. | ||
|
|
@@ -176,7 +176,7 @@ liblzma = { version = "0.4.6", features = ["static"] } | |
| log = "^0.4" | ||
| 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 } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| parking_lot = "0.12" | ||
| parquet = { version = "59.2.0", default-features = false, features = [ | ||
| "arrow", | ||
|
|
@@ -359,3 +359,20 @@ debug = false | |
| debug-assertions = false | ||
| strip = "debuginfo" | ||
| incremental = false | ||
|
|
||
| ## Temporary arrow-rs patch until 60.0.0 is released | ||
|
|
||
| [patch.crates-io] | ||
| arrow = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-array = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-avro = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-buffer = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-cast = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-data = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-ipc = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-schema = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-select = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-string = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-ord = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| arrow-flight = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| parquet = { git = "https://github.com/apache/arrow-rs.git", rev = "901e69f913bb8a1738009218898959e8f4cd7ec8" } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -662,9 +662,9 @@ mod tests { | |
| +-----------------------------------+-----------------+---------------------+------+------------------+ | ||
| | filename | file_size_bytes | metadata_size_bytes | hits | extra | | ||
| +-----------------------------------+-----------------+---------------------+------+------------------+ | ||
| | alltypes_plain.parquet | 1851 | 8794 | 1 | page_index=false | | ||
| | alltypes_tiny_pages.parquet | 454233 | 268970 | 2 | page_index=true | | ||
| | lz4_raw_compressed_larger.parquet | 380836 | 1331 | 1 | page_index=false | | ||
| | alltypes_plain.parquet | 1851 | 8970 | 1 | page_index=false | | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Parquet metadata heap sizes shifted slightly:
|
||
| | alltypes_tiny_pages.parquet | 454233 | 269562 | 2 | page_index=true | | ||
| | lz4_raw_compressed_larger.parquet | 380836 | 1347 | 1 | page_index=false | | ||
| +-----------------------------------+-----------------+---------------------+------+------------------+ | ||
| "); | ||
|
|
||
|
|
@@ -693,9 +693,9 @@ mod tests { | |
| +-----------------------------------+-----------------+---------------------+------+------------------+ | ||
| | filename | file_size_bytes | metadata_size_bytes | hits | extra | | ||
| +-----------------------------------+-----------------+---------------------+------+------------------+ | ||
| | alltypes_plain.parquet | 1851 | 8794 | 4 | page_index=false | | ||
| | alltypes_tiny_pages.parquet | 454233 | 268970 | 2 | page_index=true | | ||
| | lz4_raw_compressed_larger.parquet | 380836 | 1331 | 2 | page_index=false | | ||
| | alltypes_plain.parquet | 1851 | 8970 | 4 | page_index=false | | ||
| | alltypes_tiny_pages.parquet | 454233 | 269562 | 2 | page_index=true | | ||
| | lz4_raw_compressed_larger.parquet | 380836 | 1347 | 2 | page_index=false | | ||
| +-----------------------------------+-----------------+---------------------+------+------------------+ | ||
| "); | ||
|
|
||
|
|
@@ -862,14 +862,14 @@ mod tests { | |
| ])? | ||
| .sort(vec![col("filename").sort(true, false)])?; | ||
| let rbs = df.collect().await?; | ||
| assert_snapshot!(batches_to_string(&rbs),@r" | ||
| assert_snapshot!(batches_to_string(&rbs),@r#" | ||
| +---------------------+-----------+-----------------+------+------+ | ||
| | metadata_size_bytes | filename | file_size_bytes | etag | hits | | ||
| +---------------------+-----------+-----------------+------+------+ | ||
| | 212 | 0.parquet | 3642 | 0 | 2 | | ||
| | 212 | 1.parquet | 3642 | 1 | 2 | | ||
| | 216 | 0.parquet | 3620 | "0" | 2 | | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| | 216 | 1.parquet | 3620 | "1" | 2 | | ||
| +---------------------+-----------+-----------------+------+------+ | ||
| "); | ||
| "#); | ||
|
|
||
| Ok(()) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ use datafusion_expr::{BinaryExpr, Operator, lit, utils}; | |
|
|
||
| use arrow::{ | ||
| array::AsArray, | ||
| datatypes::{DataType, Field}, | ||
| datatypes::{DataType, Field, Metadata}, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Arrow 60 introduces a new metadata type: |
||
| record_batch::RecordBatch, | ||
| }; | ||
| use datafusion_expr::execution_props::ExecutionProps; | ||
|
|
@@ -423,7 +423,7 @@ pub async fn pruned_partition_list<'a>( | |
| .iter() | ||
| .map(|(n, d)| Field::new(n, d.clone(), true)) | ||
| .collect(), | ||
| Default::default(), | ||
| Metadata::new(), | ||
| )?; | ||
|
|
||
| Ok(objects | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,7 @@ use arrow::array::{ | |
| }; | ||
| use arrow::datatypes::{ | ||
| DataType, Field, Fields, IntervalDayTime, IntervalMonthDayNano, IntervalUnit, | ||
| TimeUnit, UnionFields, UnionMode, i256, | ||
| Metadata, TimeUnit, UnionFields, UnionMode, i256, | ||
| }; | ||
| use chrono::{DateTime, Utc}; | ||
| use half::f16; | ||
|
|
@@ -396,6 +396,19 @@ impl DFHeapSize for UnionFields { | |
| } | ||
| } | ||
|
|
||
| impl DFHeapSize for Metadata { | ||
| fn heap_size(&self, ctx: &mut DFHeapSizeCtx) -> usize { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could be simpler with nicer upstream API. Filed a ticket to track: |
||
| // `Metadata` does not expose its underlying reference-counted map, so | ||
| // this approximates the `BTreeMap` entries' sizes and cannot dedupe | ||
| // instances that share the same allocation. | ||
| self.iter() | ||
| .map(|(k, v)| { | ||
| size_of::<(String, String)>() + k.heap_size(ctx) + v.heap_size(ctx) | ||
| }) | ||
| .sum() | ||
| } | ||
| } | ||
|
|
||
| impl DFHeapSize for Field { | ||
| fn heap_size(&self, ctx: &mut DFHeapSizeCtx) -> usize { | ||
| self.name().heap_size(ctx) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
flight-sql-experimentalfeature was renamed toflight-sqland the old alias has now been removed: