Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update arrow 37 #5782

Merged
merged 15 commits into from
Apr 11, 2023
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,11 @@ opt-level = 3
overflow-checks = false
panic = 'unwind'
rpath = false

[patch.crates-io]
arrow = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
arrow-array = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
arrow-buffer = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
arrow-flight = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
arrow-schema = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
parquet = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
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
46 changes: 16 additions & 30 deletions datafusion-cli/Cargo.lock

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

7 changes: 7 additions & 0 deletions datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ parking_lot = { version = "0.12" }
rustyline = "10.0"
tokio = { version = "1.24", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot"] }
url = "2.2"

[patch.crates-io]
arrow = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
arrow-array = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
arrow-buffer = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
arrow-schema = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
parquet = { git = "https://github.com/tustvold/arrow-rs.git", rev = "e45f8b5132c10505a6f2b9d8a8e8e9207049605f" }
Loading