Skip to content

Commit

Permalink
Update arrow 37 (#5782)
Browse files Browse the repository at this point in the history
* Update arrow 37

* Fix avro

* Fix sql_planner benchmark

* Update arrow pin

* Format

* Fix test

* Remove pin

* Update version

* Fix logical merge conflicts

* Pyarrow clippy

* More clippy

* fixup

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
  • Loading branch information
tustvold and alamb authored Apr 11, 2023
1 parent f033d9c commit 6e819d6
Show file tree
Hide file tree
Showing 69 changed files with 497 additions and 525 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ repository = "https://github.com/apache/arrow-datafusion"
rust-version = "1.64"

[workspace.dependencies]
arrow = { version = "36.0.0", features = ["prettyprint"] }
arrow-flight = { version = "36.0.0", features = ["flight-sql-experimental"] }
arrow-buffer = { version = "36.0.0", default-features = false }
arrow-schema = { version = "36.0.0", default-features = false }
arrow-array = { version = "36.0.0", default-features = false, features = ["chrono-tz"] }
parquet = { version = "36.0.0", features = ["arrow", "async"] }
arrow = { version = "37.0.0", features = ["prettyprint"] }
arrow-flight = { version = "37.0.0", features = ["flight-sql-experimental"] }
arrow-buffer = { version = "37.0.0", default-features = false }
arrow-schema = { version = "37.0.0", default-features = false }
arrow-array = { version = "37.0.0", default-features = false, features = ["chrono-tz"] }
parquet = { version = "37.0.0", features = ["arrow", "async"] }

[profile.release]
codegen-units = 1
Expand Down
14 changes: 6 additions & 8 deletions benchmarks/src/tpch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// under the License.

use arrow::array::{Array, ArrayRef};
use arrow::datatypes::SchemaRef;
use arrow::datatypes::{Fields, SchemaBuilder, SchemaRef};
use arrow::record_batch::RecordBatch;
use std::fs;
use std::ops::{Div, Mul};
Expand Down Expand Up @@ -45,11 +45,9 @@ pub const TPCH_TABLES: &[&str] = &[

/// The `.tbl` file contains a trailing column
pub fn get_tbl_tpch_table_schema(table: &str) -> Schema {
let mut schema = get_tpch_table_schema(table);
schema
.fields
.push(Field::new("__placeholder", DataType::Utf8, false));
schema
let mut schema = SchemaBuilder::from(get_tpch_table_schema(table).fields);
schema.push(Field::new("__placeholder", DataType::Utf8, false));
schema.finish()
}

/// Get the schema for the benchmarks derived from TPC-H
Expand Down Expand Up @@ -476,7 +474,7 @@ pub async fn transform_actual_result(
// we need to round the decimal columns and trim the Utf8 columns
// we also need to rewrite the batches to use a compatible schema
let ctx = SessionContext::new();
let fields = result[0]
let fields: Fields = result[0]
.schema()
.fields()
.iter()
Expand All @@ -485,7 +483,7 @@ pub async fn transform_actual_result(
Some(i) => f.name()[i + 1..].to_string(),
_ => f.name().to_string(),
};
f.clone().with_name(simple_name)
f.as_ref().clone().with_name(simple_name)
})
.collect();
let result_schema = SchemaRef::new(Schema::new(fields));
Expand Down
61 changes: 31 additions & 30 deletions datafusion-cli/Cargo.lock

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

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.62"
readme = "README.md"

[dependencies]
arrow = "36.0.0"
arrow = "37.0.0"
async-trait = "0.1.41"
clap = { version = "3", features = ["derive", "cargo"] }
datafusion = { path = "../datafusion/core", version = "22.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 @@ -56,6 +56,6 @@ prost-derive = { version = "0.11", default-features = false }
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.82"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot"] }
tonic = "0.8"
tonic = "0.9"
url = "2.2"
uuid = "1.2"
Loading

0 comments on commit 6e819d6

Please sign in to comment.