Skip to content

Commit fdc83e8

Browse files
authored
Update to arrow 28 (#4400)
* Update to arrow 28 * Fix avro * Fix bad_extension_planner test * Further tweaks * More fixes * Fixes * Remove crates patch * Review feedback
1 parent 49166ea commit fdc83e8

File tree

44 files changed

+225
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+225
-236
lines changed

benchmarks/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ simd = ["datafusion/simd"]
3333
snmalloc = ["snmalloc-rs"]
3434

3535
[dependencies]
36-
arrow = "27.0.0"
36+
arrow = "28.0.0"
3737
datafusion = { path = "../datafusion/core", version = "14.0.0", features = ["scheduler"] }
3838
env_logger = "0.10"
3939
futures = "0.3"
4040
mimalloc = { version = "0.1", optional = true, default-features = false }
4141
num_cpus = "1.13.0"
4242
object_store = "0.5.0"
43-
parquet = "27.0.0"
43+
parquet = "28.0.0"
4444
parquet-test-utils = { path = "../parquet-test-utils/", version = "0.1.0" }
4545
rand = "0.8.4"
4646
serde = { version = "1.0.136", features = ["derive"] }

datafusion-cli/Cargo.lock

Lines changed: 42 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rust-version = "1.62"
2929
readme = "README.md"
3030

3131
[dependencies]
32-
arrow = "27.0.0"
32+
arrow = "28.0.0"
3333
clap = { version = "3", features = ["derive", "cargo"] }
3434
datafusion = { path = "../datafusion/core", version = "14.0.0" }
3535
dirs = "4.0.0"

datafusion-examples/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ path = "examples/avro_sql.rs"
3434
required-features = ["datafusion/avro"]
3535

3636
[dev-dependencies]
37-
arrow = "27.0.0"
38-
arrow-flight = "27.0.0"
37+
arrow = "28.0.0"
38+
arrow-flight = "28.0.0"
3939
async-trait = "0.1.41"
4040
datafusion = { path = "../datafusion/core" }
4141
datafusion-common = { path = "../datafusion/common" }

datafusion/common/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ pyarrow = ["pyo3", "arrow/pyarrow"]
4040

4141
[dependencies]
4242
apache-avro = { version = "0.14", default-features = false, features = ["snappy"], optional = true }
43-
arrow = { version = "27.0.0", default-features = false }
43+
arrow = { version = "28.0.0", default-features = false }
4444
chrono = { version = "0.4", default-features = false }
4545
cranelift-module = { version = "0.89.0", optional = true }
4646
object_store = { version = "0.5.0", default-features = false, optional = true }
47-
parquet = { version = "27.0.0", default-features = false, optional = true }
47+
parquet = { version = "28.0.0", default-features = false, optional = true }
4848
pyo3 = { version = "0.17.1", optional = true }
4949
sqlparser = "0.27"

datafusion/common/src/dfschema.rs

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ impl DFField {
625625
mod tests {
626626
use super::*;
627627
use arrow::datatypes::DataType;
628-
use std::collections::BTreeMap;
629628

630629
#[test]
631630
fn qualifier_in_name() -> Result<()> {
@@ -673,8 +672,8 @@ mod tests {
673672
fn from_qualified_schema_into_arrow_schema() -> Result<()> {
674673
let schema = DFSchema::try_from_qualified_schema("t1", &test_schema_1())?;
675674
let arrow_schema: Schema = schema.into();
676-
let expected = "Field { name: \"c0\", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: None }, \
677-
Field { name: \"c1\", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: None }";
675+
let expected = "Field { name: \"c0\", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, \
676+
Field { name: \"c1\", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }";
678677
assert_eq!(expected, arrow_schema.to_string());
679678
Ok(())
680679
}
@@ -798,7 +797,7 @@ mod tests {
798797
field1_i16_t
799798
.field()
800799
.clone()
801-
.with_metadata(Some(test_bmetadata_n(2))),
800+
.with_metadata(test_metadata_n(2)),
802801
);
803802
let field1_i16_t_qualified =
804803
DFField::from_qualified("foo", field1_i16_t.field().clone());
@@ -947,12 +946,12 @@ mod tests {
947946
fn test_dfschema_to_schema_convertion() {
948947
let mut a: DFField = DFField::new(Some("table1"), "a", DataType::Int64, false);
949948
let mut b: DFField = DFField::new(Some("table1"), "b", DataType::Int64, false);
950-
let mut a_metadata = BTreeMap::new();
949+
let mut a_metadata = HashMap::new();
951950
a_metadata.insert("key".to_string(), "value".to_string());
952-
a.field.set_metadata(Some(a_metadata));
953-
let mut b_metadata = BTreeMap::new();
951+
a.field.set_metadata(a_metadata);
952+
let mut b_metadata = HashMap::new();
954953
b_metadata.insert("key".to_string(), "value".to_string());
955-
b.field.set_metadata(Some(b_metadata));
954+
b.field.set_metadata(b_metadata);
956955

957956
let df_schema = Arc::new(
958957
DFSchema::new_with_metadata([a, b].to_vec(), HashMap::new()).unwrap(),
@@ -980,11 +979,4 @@ mod tests {
980979
.map(|i| (format!("k{}", i), format!("v{}", i)))
981980
.collect()
982981
}
983-
984-
fn test_bmetadata_n(n: usize) -> BTreeMap<String, String> {
985-
(0..n)
986-
.into_iter()
987-
.map(|i| (format!("k{}", i), format!("v{}", i)))
988-
.collect()
989-
}
990982
}

0 commit comments

Comments
 (0)