Skip to content

Commit

Permalink
Update to arrow 18.0.0 (#2856)
Browse files Browse the repository at this point in the history
* Update to arrow/parquet 18.0.0

* clean up field creation API

* Update use `BasicDecimalArray`
  • Loading branch information
alamb committed Jul 11, 2022
1 parent b6370ee commit d0d5564
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 34 deletions.
2 changes: 1 addition & 1 deletion datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rust-version = "1.59"
readme = "README.md"

[dependencies]
arrow = { version = "17.0.0" }
arrow = { version = "18.0.0" }
clap = { version = "3", features = ["derive", "cargo"] }
datafusion = { path = "../datafusion/core", version = "9.0.0" }
dirs = "4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ path = "examples/avro_sql.rs"
required-features = ["datafusion/avro"]

[dev-dependencies]
arrow-flight = { version = "17.0.0" }
arrow-flight = { version = "18.0.0" }
async-trait = "0.1.41"
datafusion = { path = "../datafusion/core" }
futures = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions datafusion/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jit = ["cranelift-module"]
pyarrow = ["pyo3"]

[dependencies]
arrow = { version = "17.0.0", features = ["prettyprint"] }
arrow = { version = "18.0.0", features = ["prettyprint"] }
avro-rs = { version = "0.13", features = ["snappy"], optional = true }
cranelift-module = { version = "0.85.0", optional = true }
object_store = { version = "0.3", optional = true }
ordered-float = "3.0"
parquet = { version = "17.0.0", features = ["arrow"], optional = true }
parquet = { version = "18.0.0", features = ["arrow"], optional = true }
pyo3 = { version = "0.16", optional = true }
sqlparser = "0.18"
4 changes: 2 additions & 2 deletions datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ unicode_expressions = ["datafusion-physical-expr/regex_expressions", "datafusion

[dependencies]
ahash = { version = "0.7", default-features = false }
arrow = { version = "17.0.0", features = ["prettyprint"] }
arrow = { version = "18.0.0", features = ["prettyprint"] }
async-trait = "0.1.41"
avro-rs = { version = "0.13", features = ["snappy"], optional = true }
bytes = "1.1"
Expand All @@ -78,7 +78,7 @@ num_cpus = "1.13.0"
object_store = "0.3.0"
ordered-float = "3.0"
parking_lot = "0.12"
parquet = { version = "17.0.0", features = ["arrow", "async"] }
parquet = { version = "18.0.0", features = ["arrow", "async"] }
paste = "^1.0"
pin-project-lite = "^0.2.7"
pyo3 = { version = "0.16", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/fuzz-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow = { version = "17.0.0", features = ["prettyprint"] }
arrow = { version = "18.0.0", features = ["prettyprint"] }
env_logger = "0.9.0"
rand = "0.8"
10 changes: 5 additions & 5 deletions datafusion/core/src/physical_plan/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ use ahash::RandomState;

use arrow::{
array::{
as_dictionary_array, as_string_array, ArrayData, ArrayRef, BooleanArray,
Date32Array, Date64Array, DecimalArray, DictionaryArray, LargeStringArray,
PrimitiveArray, TimestampMicrosecondArray, TimestampMillisecondArray,
TimestampSecondArray, UInt32BufferBuilder, UInt32Builder, UInt64BufferBuilder,
UInt64Builder,
as_dictionary_array, as_string_array, ArrayData, ArrayRef, BasicDecimalArray,
BooleanArray, Date32Array, Date64Array, DecimalArray, DictionaryArray,
LargeStringArray, PrimitiveArray, TimestampMicrosecondArray,
TimestampMillisecondArray, TimestampSecondArray, UInt32BufferBuilder,
UInt32Builder, UInt64BufferBuilder, UInt64Builder,
},
compute,
datatypes::{
Expand Down
6 changes: 3 additions & 3 deletions datafusion/core/src/physical_plan/hash_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
use crate::error::{DataFusionError, Result};
use ahash::{CallHasher, RandomState};
use arrow::array::{
Array, ArrayRef, BooleanArray, Date32Array, Date64Array, DecimalArray,
DictionaryArray, Float32Array, Float64Array, Int16Array, Int32Array, Int64Array,
Int8Array, LargeStringArray, StringArray, TimestampMicrosecondArray,
Array, ArrayRef, BasicDecimalArray, BooleanArray, Date32Array, Date64Array,
DecimalArray, DictionaryArray, Float32Array, Float64Array, Int16Array, Int32Array,
Int64Array, Int8Array, LargeStringArray, StringArray, TimestampMicrosecondArray,
TimestampMillisecondArray, TimestampNanosecondArray, TimestampSecondArray,
UInt16Array, UInt32Array, UInt64Array, UInt8Array,
};
Expand Down
3 changes: 1 addition & 2 deletions datafusion/core/src/physical_plan/join_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ fn output_join_field(old_field: &Field, join_type: &JoinType, is_left: bool) ->
};

if force_nullable {
// Could cleanup after https://github.com/apache/arrow-rs/issues/1934
Field::new(old_field.name(), old_field.data_type().clone(), true)
old_field.clone().with_nullable(true)
} else {
old_field.clone()
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/expr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ path = "src/lib.rs"

[dependencies]
ahash = { version = "0.7", default-features = false }
arrow = { version = "17.0.0", features = ["prettyprint"] }
arrow = { version = "18.0.0", features = ["prettyprint"] }
datafusion-common = { path = "../common", version = "9.0.0" }
sqlparser = "0.18"
2 changes: 1 addition & 1 deletion datafusion/jit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ path = "src/lib.rs"
jit = []

[dependencies]
arrow = { version = "17.0.0" }
arrow = { version = "18.0.0" }
cranelift = "0.85.0"
cranelift-jit = "0.85.0"
cranelift-module = "0.85.0"
Expand Down
2 changes: 1 addition & 1 deletion datafusion/optimizer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ default = ["unicode_expressions"]
unicode_expressions = []

[dependencies]
arrow = { version = "17.0.0", features = ["prettyprint"] }
arrow = { version = "18.0.0", features = ["prettyprint"] }
async-trait = "0.1.41"
chrono = { version = "0.4", default-features = false }
datafusion-common = { path = "../common", version = "9.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ unicode_expressions = ["unicode-segmentation"]

[dependencies]
ahash = { version = "0.7", default-features = false }
arrow = { version = "17.0.0", features = ["prettyprint"] }
arrow = { version = "18.0.0", features = ["prettyprint"] }
blake2 = { version = "^0.10.2", optional = true }
blake3 = { version = "1.0", optional = true }
chrono = { version = "0.4", default-features = false }
Expand Down
9 changes: 5 additions & 4 deletions datafusion/physical-expr/src/aggregate/min_max.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ use arrow::compute;
use arrow::datatypes::{DataType, TimeUnit};
use arrow::{
array::{
ArrayRef, Date32Array, Date64Array, Float32Array, Float64Array, Int16Array,
Int32Array, Int64Array, Int8Array, LargeStringArray, StringArray,
TimestampMicrosecondArray, TimestampMillisecondArray, TimestampNanosecondArray,
TimestampSecondArray, UInt16Array, UInt32Array, UInt64Array, UInt8Array,
ArrayRef, BasicDecimalArray, Date32Array, Date64Array, Float32Array,
Float64Array, Int16Array, Int32Array, Int64Array, Int8Array, LargeStringArray,
StringArray, TimestampMicrosecondArray, TimestampMillisecondArray,
TimestampNanosecondArray, TimestampSecondArray, UInt16Array, UInt32Array,
UInt64Array, UInt8Array,
},
datatypes::Field,
};
Expand Down
4 changes: 2 additions & 2 deletions datafusion/physical-expr/src/aggregate/sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use arrow::compute;
use arrow::datatypes::DataType;
use arrow::{
array::{
ArrayRef, Float32Array, Float64Array, Int16Array, Int32Array, Int64Array,
Int8Array, UInt16Array, UInt32Array, UInt64Array, UInt8Array,
ArrayRef, BasicDecimalArray, Float32Array, Float64Array, Int16Array, Int32Array,
Int64Array, Int8Array, UInt16Array, UInt32Array, UInt64Array, UInt8Array,
},
datatypes::Field,
};
Expand Down
6 changes: 3 additions & 3 deletions datafusion/physical-expr/src/expressions/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ mod tests {
use crate::expressions::col;
use arrow::{
array::{
Array, DecimalArray, Float32Array, Float64Array, Int16Array, Int32Array,
Int64Array, Int8Array, StringArray, Time64NanosecondArray,
TimestampNanosecondArray, UInt32Array,
Array, BasicDecimalArray, DecimalArray, Float32Array, Float64Array,
Int16Array, Int32Array, Int64Array, Int8Array, StringArray,
Time64NanosecondArray, TimestampNanosecondArray, UInt32Array,
},
datatypes::*,
util::decimal::{BasicDecimal, Decimal128},
Expand Down
3 changes: 2 additions & 1 deletion datafusion/physical-expr/src/expressions/try_cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ mod tests {
use super::*;
use crate::expressions::col;
use arrow::array::{
DecimalArray, DecimalBuilder, StringArray, Time64NanosecondArray,
BasicDecimalArray, DecimalArray, DecimalBuilder, StringArray,
Time64NanosecondArray,
};
use arrow::util::decimal::{BasicDecimal, Decimal128};
use arrow::{
Expand Down
2 changes: 1 addition & 1 deletion datafusion/proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ path = "src/lib.rs"
[features]

[dependencies]
arrow = { version = "17.0.0" }
arrow = { version = "18.0.0" }
datafusion = { path = "../core", version = "9.0.0" }
datafusion-common = { path = "../common", version = "9.0.0" }
datafusion-expr = { path = "../expr", version = "9.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion datafusion/row/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ path = "src/lib.rs"
jit = ["datafusion-jit"]

[dependencies]
arrow = { version = "17.0.0" }
arrow = { version = "18.0.0" }
datafusion-common = { path = "../common", version = "9.0.0" }
datafusion-jit = { path = "../jit", version = "9.0.0", optional = true }
paste = "^1.0"
Expand Down
2 changes: 1 addition & 1 deletion datafusion/sql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ unicode_expressions = []

[dependencies]
ahash = { version = "0.7", default-features = false }
arrow = { version = "17.0.0", features = ["prettyprint"] }
arrow = { version = "18.0.0", features = ["prettyprint"] }
datafusion-common = { path = "../common", version = "9.0.0" }
datafusion-expr = { path = "../expr", version = "9.0.0" }
hashbrown = "0.12"
Expand Down

0 comments on commit d0d5564

Please sign in to comment.