Skip to content

Apache DataFusion SQL Query Engine

Update to arrow v29 (#4587)

Raphael Taylor-Davies9a9339877801
diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml
index 977658f375..619fe973c0 100644
--- a/benchmarks/Cargo.toml
+++ b/benchmarks/Cargo.toml
@@ -33,14 +33,14 @@ simd = ["datafusion/simd"]
snmalloc = ["snmalloc-rs"]
[dependencies]
-arrow = "28.0.0"
+arrow = "29.0.0"
datafusion = { path = "../datafusion/core", version = "15.0.0", features = ["scheduler"] }
env_logger = "0.10"
futures = "0.3"
mimalloc = { version = "0.1", optional = true, default-features = false }
num_cpus = "1.13.0"
object_store = "0.5.0"
-parquet = "28.0.0"
+parquet = "29.0.0"
parquet-test-utils = { path = "../parquet-test-utils/", version = "0.1.0" }
rand = "0.8.4"
serde = { version = "1.0.136", features = ["derive"] }
diff --git a/datafusion-cli/Cargo.lock b/datafusion-cli/Cargo.lock
index 2edc514070..cb6c543abe 100644
--- a/datafusion-cli/Cargo.lock
+++ b/datafusion-cli/Cargo.lock
@@ -68,9 +68,9 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
[[package]]
name = "arrow"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aed9849f86164fad5cb66ce4732782b15f1bc97f8febab04e782c20cce9d4b6c"
+checksum = "2fe17dc0113da7e2eaeaedbd304d347aa8ea64916d225b79a5c3f3b6b5d8da4c"
dependencies = [
"ahash",
"arrow-array",
@@ -80,8 +80,10 @@ dependencies = [
"arrow-data",
"arrow-ipc",
"arrow-json",
+ "arrow-ord",
"arrow-schema",
"arrow-select",
+ "arrow-string",
"chrono",
"comfy-table",
"half",
@@ -89,14 +91,13 @@ dependencies = [
"multiversion",
"num",
"regex",
- "regex-syntax",
]
[[package]]
name = "arrow-array"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b8504cf0a6797e908eecf221a865e7d339892720587f87c8b90262863015b08"
+checksum = "b9452131e027aec3276e43449162af084db611c42ef875e54d231e6580bc6254"
dependencies = [
"ahash",
"arrow-buffer",
@@ -110,9 +111,9 @@ dependencies = [
[[package]]
name = "arrow-buffer"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6de64a27cea684b24784647d9608314bc80f7c4d55acb44a425e05fab39d916"
+checksum = "4a301001e8ed7da638a12fa579ac5f3f154c44c0655f2ca6ed0f8586b418a779"
dependencies = [
"half",
"num",
@@ -120,9 +121,9 @@ dependencies = [
[[package]]
name = "arrow-cast"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bec4a54502eefe05923c385c90a005d69474fa06ca7aa2a2b123c9f9532f6178"
+checksum = "048c91d067f2eb8cc327f086773e5b0f0d7714780807fc4db09366584e23bac8"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -136,9 +137,9 @@ dependencies = [
[[package]]
name = "arrow-csv"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7902bbf8127eac48554fe902775303377047ad49a9fd473c2b8cb399d092080"
+checksum = "ed914cd0006a3bb9cac8136b3098ac7796ad26b82362f00d4f2e7c1a54684b86"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -154,9 +155,9 @@ dependencies = [
[[package]]
name = "arrow-data"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e4882efe617002449d5c6b5de9ddb632339074b36df8a96ea7147072f1faa8a"
+checksum = "e59619d9d102e4e6b22087b2bd60c07df76fcb68683620841718f6bc8e8f02cb"
dependencies = [
"arrow-buffer",
"arrow-schema",
@@ -166,9 +167,9 @@ dependencies = [
[[package]]
name = "arrow-ipc"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa0703a6de2785828561b03a4d7793ecd333233e1b166316b4bfc7cfce55a4a7"
+checksum = "fb7ad6d2fa06a1cebdaa213c59fc953b9230e560d8374aba133b572b864ec55e"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -180,9 +181,9 @@ dependencies = [
[[package]]
name = "arrow-json"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bd23fc8c6d251f96cd63b96fece56bbb9710ce5874a627cb786e2600673595a"
+checksum = "1e22efab3ad70336057660c5e5f2b72e2417e3444c27cb42dc477d678ddd6979"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -196,17 +197,31 @@ dependencies = [
"serde_json",
]
+[[package]]
+name = "arrow-ord"
+version = "29.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e23b623332804a65ad11e7732c351896dcb132c19f8e25d99fdb13b00aae5206"
+dependencies = [
+ "arrow-array",
+ "arrow-buffer",
+ "arrow-data",
+ "arrow-schema",
+ "arrow-select",
+ "num",
+]
+
[[package]]
name = "arrow-schema"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da9f143882a80be168538a60e298546314f50f11f2a288c8d73e11108da39d26"
+checksum = "69ef17c144f1253b9864f5a3e8f4c6f1e436bdd52394855d5942f132f776b64e"
[[package]]
name = "arrow-select"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "520406331d4ad60075359524947ebd804e479816439af82bcb17f8d280d9b38c"
+checksum = "e2accaf218ff107e3df0ee8f1e09b092249a1cc741c4377858a1470fd27d7096"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -215,6 +230,21 @@ dependencies = [
"num",
]
+[[package]]
+name = "arrow-string"
+version = "29.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4a0954f9e1f45b04815ddacbde72899bf3c03a08fa6c0375f42178c4a01a510"
+dependencies = [
+ "arrow-array",
+ "arrow-buffer",
+ "arrow-data",
+ "arrow-schema",
+ "arrow-select",
+ "regex",
+ "regex-syntax",
+]
+
[[package]]
name = "async-compression"
version = "0.3.15"
@@ -1722,9 +1752,9 @@ dependencies = [
[[package]]
name = "parquet"
-version = "28.0.0"
+version = "29.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21433e9209111bb3720b747f2f137e0d115af1af0420a7a1c26b6e88227fa353"
+checksum = "d906343fd18ace6b998d5074697743e8e9358efa8c3c796a1381b98cba813338"
dependencies = [
"ahash",
"arrow-array",
diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml
index 012fbc3023..2f61d38839 100644
--- a/datafusion-cli/Cargo.toml
+++ b/datafusion-cli/Cargo.toml
@@ -29,7 +29,7 @@ rust-version = "1.62"
readme = "README.md"
[dependencies]
-arrow = "28.0.0"
+arrow = "29.0.0"
clap = { version = "3", features = ["derive", "cargo"] }
datafusion = { path = "../datafusion/core", version = "15.0.0" }
dirs = "4.0.0"
diff --git a/datafusion-examples/Cargo.toml b/datafusion-examples/Cargo.toml
index e1403466f8..bdaa844c74 100644
--- a/datafusion-examples/Cargo.toml
+++ b/datafusion-examples/Cargo.toml
@@ -34,8 +34,8 @@ path = "examples/avro_sql.rs"
required-features = ["datafusion/avro"]
[dev-dependencies]
-arrow = "28.0.0"
-arrow-flight = "28.0.0"
+arrow = "29.0.0"
+arrow-flight = "29.0.0"
async-trait = "0.1.41"
datafusion = { path = "../datafusion/core" }
datafusion-common = { path = "../datafusion/common" }
diff --git a/datafusion/common/Cargo.toml b/datafusion/common/Cargo.toml
index 41eda9ff12..7df95532bf 100644
--- a/datafusion/common/Cargo.toml
+++ b/datafusion/common/Cargo.toml
@@ -40,10 +40,10 @@ pyarrow = ["pyo3", "arrow/pyarrow"]
[dependencies]
apache-avro = { version = "0.14", default-features = false, features = ["snappy"], optional = true }
-arrow = { version = "28.0.0", default-features = false }
+arrow = { version = "29.0.0", default-features = false }
chrono = { version = "0.4", default-features = false }
cranelift-module = { version = "0.89.0", optional = true }
object_store = { version = "0.5.0", default-features = false, optional = true }
-parquet = { version = "28.0.0", default-features = false, optional = true }
+parquet = { version = "29.0.0", default-features = false, optional = true }
pyo3 = { version = "0.17.1", optional = true }
sqlparser = "0.28"
diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml
index 3a7313b5a0..e8c615e782 100644
--- a/datafusion/core/Cargo.toml
+++ b/datafusion/core/Cargo.toml
@@ -57,7 +57,7 @@ unicode_expressions = ["datafusion-physical-expr/regex_expressions", "datafusion
[dependencies]
ahash = { version = "0.8", default-features = false, features = ["runtime-rng"] }
apache-avro = { version = "0.14", optional = true }
-arrow = { version = "28.0.0", features = ["prettyprint"] }
+arrow = { version = "29.0.0", features = ["prettyprint"] }
async-compression = { version = "0.3.14", features = ["bzip2", "gzip", "xz", "futures-io", "tokio"], optional = true }
async-trait = "0.1.41"
bytes = "1.1"
@@ -82,7 +82,7 @@ num-traits = { version = "0.2", optional = true }
num_cpus = "1.13.0"
object_store = "0.5.0"
parking_lot = "0.12"
-parquet = { version = "28.0.0", features = ["arrow", "async"] }
+parquet = { version = "29.0.0", features = ["arrow", "async"] }
paste = "^1.0"
percent-encoding = "2.2.0"
pin-project-lite = "^0.2.7"
@@ -100,7 +100,7 @@ uuid = { version = "1.0", features = ["v4"] }
xz2 = { version = "0.1", optional = true }
[dev-dependencies]
-arrow = { version = "28.0.0", features = ["prettyprint", "dyn_cmp_dict"] }
+arrow = { version = "29.0.0", features = ["prettyprint", "dyn_cmp_dict"] }
async-trait = "0.1.53"
criterion = "0.4"
csv = "1.1.6"
diff --git a/datafusion/core/src/physical_plan/limit.rs b/datafusion/core/src/physical_plan/limit.rs
index bf6088b226..b25f81087f 100644
--- a/datafusion/core/src/physical_plan/limit.rs
+++ b/datafusion/core/src/physical_plan/limit.rs
@@ -30,7 +30,6 @@ use crate::physical_plan::{
DisplayFormatType, Distribution, EquivalenceProperties, ExecutionPlan, Partitioning,
};
use arrow::array::ArrayRef;
-use arrow::compute::limit;
use arrow::datatypes::SchemaRef;
use arrow::error::Result as ArrowResult;
use arrow::record_batch::RecordBatch;
@@ -448,7 +447,7 @@ impl LimitStream {
let limited_columns: Vec<ArrayRef> = batch
.columns()
.iter()
- .map(|col| limit(col, batch_rows))
+ .map(|col| col.slice(0, col.len().min(batch_rows)))
.collect();
Some(RecordBatch::try_new(batch.schema(), limited_columns).unwrap())
}
diff --git a/datafusion/expr/Cargo.toml b/datafusion/expr/Cargo.toml
index 3e6330b532..87a72f7c54 100644
--- a/datafusion/expr/Cargo.toml
+++ b/datafusion/expr/Cargo.toml
@@ -36,7 +36,7 @@ path = "src/lib.rs"
[dependencies]
ahash = { version = "0.8", default-features = false, features = ["runtime-rng"] }
-arrow = { version = "28.0.0", default-features = false }
+arrow = { version = "29.0.0", default-features = false }
datafusion-common = { path = "../common", version = "15.0.0" }
log = "^0.4"
sqlparser = "0.28"
diff --git a/datafusion/jit/Cargo.toml b/datafusion/jit/Cargo.toml
index 26cc5609b1..3df62c995e 100644
--- a/datafusion/jit/Cargo.toml
+++ b/datafusion/jit/Cargo.toml
@@ -36,7 +36,7 @@ path = "src/lib.rs"
jit = []
[dependencies]
-arrow = { version = "28.0.0", default-features = false }
+arrow = { version = "29.0.0", default-features = false }
cranelift = "0.89.0"
cranelift-jit = "0.89.0"
cranelift-module = "0.89.0"
diff --git a/datafusion/optimizer/Cargo.toml b/datafusion/optimizer/Cargo.toml
index 14970c405a..e3810ba300 100644
--- a/datafusion/optimizer/Cargo.toml
+++ b/datafusion/optimizer/Cargo.toml
@@ -37,7 +37,7 @@ default = ["unicode_expressions"]
unicode_expressions = []
[dependencies]
-arrow = { version = "28.0.0", features = ["prettyprint"] }
+arrow = { version = "29.0.0", features = ["prettyprint"] }
async-trait = "0.1.41"
chrono = { version = "0.4.23", default-features = false }
datafusion-common = { path = "../common", version = "15.0.0" }
diff --git a/datafusion/physical-expr/Cargo.toml b/datafusion/physical-expr/Cargo.toml
index 6c202d55e4..094d233a90 100644
--- a/datafusion/physical-expr/Cargo.toml
+++ b/datafusion/physical-expr/Cargo.toml
@@ -40,9 +40,9 @@ unicode_expressions = ["unicode-segmentation"]
[dependencies]
ahash = { version = "0.8", default-features = false, features = ["runtime-rng"] }
-arrow = { version = "28.0.0", features = ["prettyprint", "dyn_cmp_dict"] }
-arrow-buffer = "28.0.0"
-arrow-schema = "28.0.0"
+arrow = { version = "29.0.0", features = ["prettyprint", "dyn_cmp_dict"] }
+arrow-buffer = "29.0.0"
+arrow-schema = "29.0.0"
blake2 = { version = "^0.10.2", optional = true }
blake3 = { version = "1.0", optional = true }
chrono = { version = "0.4.23", default-features = false }
diff --git a/datafusion/physical-expr/src/expressions/nullif.rs b/datafusion/physical-expr/src/expressions/nullif.rs
index 312246d359..803068525c 100644
--- a/datafusion/physical-expr/src/expressions/nullif.rs
+++ b/datafusion/physical-expr/src/expressions/nullif.rs
@@ -20,7 +20,7 @@ use std::sync::Arc;
use arrow::array::Array;
use arrow::array::*;
use arrow::compute::eq_dyn;
-use arrow::compute::kernels::boolean::nullif;
+use arrow::compute::nullif::nullif;
use arrow::datatypes::DataType;
use datafusion_common::{cast::as_boolean_array, DataFusionError, Result};
use datafusion_expr::ColumnarValue;
diff --git a/datafusion/proto/Cargo.toml b/datafusion/proto/Cargo.toml
index 6d8ba859f4..82538665eb 100644
--- a/datafusion/proto/Cargo.toml
+++ b/datafusion/proto/Cargo.toml
@@ -40,7 +40,7 @@ default = []
json = ["pbjson", "serde", "serde_json"]
[dependencies]
-arrow = "28.0.0"
+arrow = "29.0.0"
chrono = { version = "0.4", default-features = false }
datafusion = { path = "../core", version = "15.0.0" }
datafusion-common = { path = "../common", version = "15.0.0" }
@@ -60,4 +60,4 @@ tokio = "1.18"
[build-dependencies]
# Pin these dependencies so that the generated output is deterministic
pbjson-build = { version = "=0.5.1" }
-prost-build = { version = "=0.11.2" }
+prost-build = { version = "=0.11.3" }
diff --git a/datafusion/row/Cargo.toml b/datafusion/row/Cargo.toml
index 13a2ddb257..bd75bf3a70 100644
--- a/datafusion/row/Cargo.toml
+++ b/datafusion/row/Cargo.toml
@@ -37,7 +37,7 @@ path = "src/lib.rs"
jit = ["datafusion-jit"]
[dependencies]
-arrow = "28.0.0"
+arrow = "29.0.0"
datafusion-common = { path = "../common", version = "15.0.0" }
datafusion-jit = { path = "../jit", version = "15.0.0", optional = true }
paste = "^1.0"
diff --git a/datafusion/sql/Cargo.toml b/datafusion/sql/Cargo.toml
index dd19e6affb..12f4534e63 100644
--- a/datafusion/sql/Cargo.toml
+++ b/datafusion/sql/Cargo.toml
@@ -37,7 +37,7 @@ default = ["unicode_expressions"]
unicode_expressions = []
[dependencies]
-arrow-schema = "28.0.0"
+arrow-schema = "29.0.0"
datafusion-common = { path = "../common", version = "15.0.0" }
datafusion-expr = { path = "../expr", version = "15.0.0" }
log = "^0.4"
diff --git a/parquet-test-utils/Cargo.toml b/parquet-test-utils/Cargo.toml
index b6e9dc045c..fc2d964613 100644
--- a/parquet-test-utils/Cargo.toml
+++ b/parquet-test-utils/Cargo.toml
@@ -25,4 +25,4 @@ edition = "2021"
[dependencies]
datafusion = { path = "../datafusion/core" }
object_store = "0.5.0"
-parquet = "28.0.0"
+parquet = "29.0.0"
diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml
index f4067dc48a..bde0314ba6 100644
--- a/test-utils/Cargo.toml
+++ b/test-utils/Cargo.toml
@@ -23,7 +23,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-arrow = { version = "28.0.0", features = ["prettyprint"] }
+arrow = { version = "29.0.0", features = ["prettyprint"] }
datafusion-common = { path = "../datafusion/common" }
env_logger = "0.10.0"
rand = "0.8"