Skip to content

Commit

Permalink
Upgrade arrow-rs, parquet to 54.0.0 and pyo3 to 0.23.3 (#14153)
Browse files Browse the repository at this point in the history
* Upgrade arrow-rs, parquet and pyo3

* Fix fmt CI
  • Loading branch information
Owen-CH-Leung authored Jan 17, 2025
1 parent 3082ac6 commit a407500
Show file tree
Hide file tree
Showing 13 changed files with 113 additions and 94 deletions.
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ version = "44.0.0"
ahash = { version = "0.8", default-features = false, features = [
"runtime-rng",
] }
arrow = { version = "53.3.0", features = [
arrow = { version = "54.0.0", features = [
"prettyprint",
] }
arrow-array = { version = "53.3.0", default-features = false, features = [
arrow-array = { version = "54.0.0", default-features = false, features = [
"chrono-tz",
] }
arrow-buffer = { version = "53.3.0", default-features = false }
arrow-flight = { version = "53.3.0", features = [
arrow-buffer = { version = "54.0.0", default-features = false }
arrow-flight = { version = "54.0.0", features = [
"flight-sql-experimental",
] }
arrow-ipc = { version = "53.3.0", default-features = false, features = [
arrow-ipc = { version = "54.0.0", default-features = false, features = [
"lz4",
] }
arrow-ord = { version = "53.3.0", default-features = false }
arrow-schema = { version = "53.3.0", default-features = false }
arrow-ord = { version = "54.0.0", default-features = false }
arrow-schema = { version = "54.0.0", default-features = false }
async-trait = "0.1.73"
bigdecimal = "0.4.7"
bytes = "1.4"
Expand Down Expand Up @@ -133,7 +133,7 @@ itertools = "0.14"
log = "^0.4"
object_store = { version = "0.11.0", default-features = false }
parking_lot = "0.12"
parquet = { version = "53.3.0", default-features = false, features = [
parquet = { version = "54.0.0", default-features = false, features = [
"arrow",
"async",
"object_store",
Expand Down
68 changes: 30 additions & 38 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rust-version = "1.80.1"
readme = "README.md"

[dependencies]
arrow = { version = "53.0.0" }
arrow = { version = "54.0.0" }
async-trait = "0.1.73"
## 1.5.13 requires a hiher MSRV 1.81 so lock until DataFusion MSRV catches up
aws-config = "=1.5.10"
Expand Down Expand Up @@ -62,7 +62,7 @@ home = "=0.5.9"
mimalloc = { version = "0.1", default-features = false }
object_store = { version = "0.11.0", features = ["aws", "gcp", "http"] }
parking_lot = { version = "0.12" }
parquet = { version = "53.0.0", default-features = false }
parquet = { version = "54.0.0", default-features = false }
regex = "1.8"
rustyline = "14.0"
tokio = { version = "1.24", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot", "signal"] }
Expand Down
2 changes: 1 addition & 1 deletion datafusion/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ log = { workspace = true }
object_store = { workspace = true, optional = true }
parquet = { workspace = true, optional = true, default-features = true }
paste = "1.0.15"
pyo3 = { version = "0.22.0", optional = true }
pyo3 = { version = "0.23.3", optional = true }
recursive = { workspace = true, optional = true }
sqlparser = { workspace = true }
tokio = { workspace = true }
Expand Down
18 changes: 13 additions & 5 deletions datafusion/common/src/file_options/parquet_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use crate::{
};

use arrow_schema::Schema;
#[allow(deprecated)]
use parquet::{
arrow::ARROW_SCHEMA_META_KEY,
basic::{BrotliLevel, GzipLevel, ZstdLevel},
Expand Down Expand Up @@ -157,8 +158,10 @@ impl TryFrom<&TableParquetOptions> for WriterPropertiesBuilder {
}

if let Some(max_statistics_size) = options.max_statistics_size {
builder =
builder.set_column_max_statistics_size(path, max_statistics_size);
builder = {
#[allow(deprecated)]
builder.set_column_max_statistics_size(path, max_statistics_size)
}
}
}

Expand Down Expand Up @@ -244,15 +247,19 @@ impl ParquetOptions {
.and_then(|s| parse_statistics_string(s).ok())
.unwrap_or(DEFAULT_STATISTICS_ENABLED),
)
.set_max_statistics_size(
max_statistics_size.unwrap_or(DEFAULT_MAX_STATISTICS_SIZE),
)
.set_max_row_group_size(*max_row_group_size)
.set_created_by(created_by.clone())
.set_column_index_truncate_length(*column_index_truncate_length)
.set_data_page_row_count_limit(*data_page_row_count_limit)
.set_bloom_filter_enabled(*bloom_filter_on_write);

builder = {
#[allow(deprecated)]
builder.set_max_statistics_size(
max_statistics_size.unwrap_or(DEFAULT_MAX_STATISTICS_SIZE),
)
};

if let Some(bloom_filter_fpp) = bloom_filter_fpp {
builder = builder.set_bloom_filter_fpp(*bloom_filter_fpp);
};
Expand Down Expand Up @@ -528,6 +535,7 @@ mod tests {
),
bloom_filter_fpp: bloom_filter_default_props.map(|p| p.fpp),
bloom_filter_ndv: bloom_filter_default_props.map(|p| p.ndv),
#[allow(deprecated)]
max_statistics_size: Some(props.max_statistics_size(&col)),
}
}
Expand Down
Loading

0 comments on commit a407500

Please sign in to comment.