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 45.0.0 And Datum Arithmetic, change Decimal Division semantics #6832

Merged
merged 24 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
68a89b3
Datum based arithmetic
tustvold Jul 3, 2023
47c4fe1
Update scalar timestamp arithmetic tests
tustvold Jul 4, 2023
5180300
Clippy
tustvold Jul 4, 2023
c189ab8
Merge remote-tracking branch 'upstream/main' into datum-arithmetic
tustvold Jul 12, 2023
3fa6236
Update negation
tustvold Jul 12, 2023
36205a2
Update sqllogictests
tustvold Jul 13, 2023
152408b
Merge remote-tracking branch 'upstream/main' into datum-arithmetic
tustvold Jul 13, 2023
be29b4c
Update arrow 44.0.0
tustvold Jul 18, 2023
9af340c
Merge remote-tracking branch 'upstream/main' into datum-arithmetic
tustvold Jul 18, 2023
87cf899
Update for fixed size binary comparisons
tustvold Jul 18, 2023
632cc2c
Clippy
tustvold Jul 18, 2023
a2dda89
Merge remote-tracking branch 'upstream/main' into datum-arithmetic
tustvold Jul 29, 2023
eebfc28
Update pin
tustvold Jul 30, 2023
001a747
Override formatting
tustvold Jul 30, 2023
b774150
Merge remote-tracking branch 'upstream/master' into datum-arithmetic
tustvold Jul 30, 2023
88217bb
Make test stable
tustvold Jul 30, 2023
4cfb92b
Remove temporary file
tustvold Jul 30, 2023
5d2bd3b
Update datafusion-cli lockfile
tustvold Jul 30, 2023
6a6048e
Update pin
tustvold Aug 2, 2023
027d2de
Merge remote-tracking branch 'upstream/main' into datum-arithmetic
tustvold Aug 2, 2023
ec92746
Format
tustvold Aug 2, 2023
3b9b605
Move DEFAULT_FORMAT_OPTIONS to datafusion_common
tustvold Aug 2, 2023
735d315
Merge remote-tracking branch 'apache/main' into datum-arithmetic
alamb Aug 8, 2023
e0c4b1f
Merge remote-tracking branch 'apache/main' into datum-arithmetic
alamb Aug 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ rust-version = "1.70"
version = "28.0.0"

[workspace.dependencies]
arrow = { version = "43.0.0", features = ["prettyprint", "dyn_cmp_dict"] }
arrow-array = { version = "43.0.0", default-features = false, features = ["chrono-tz"] }
arrow-buffer = { version = "43.0.0", default-features = false }
arrow-flight = { version = "43.0.0", features = ["flight-sql-experimental"] }
arrow-schema = { version = "43.0.0", default-features = false }
parquet = { version = "43.0.0", features = ["arrow", "async", "object_store"] }
arrow = { version = "45.0.0", features = ["prettyprint", "dyn_cmp_dict"] }
arrow-array = { version = "45.0.0", default-features = false, features = ["chrono-tz"] }
arrow-buffer = { version = "45.0.0", default-features = false }
arrow-flight = { version = "45.0.0", features = ["flight-sql-experimental"] }
arrow-schema = { version = "45.0.0", default-features = false }
parquet = { version = "45.0.0", features = ["arrow", "async", "object_store"] }
sqlparser = { version = "0.36.1", features = ["visitor"] }

[profile.release]
Expand Down
60 changes: 30 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.70"
readme = "README.md"

[dependencies]
arrow = "43.0.0"
arrow = "45.0.0"
async-trait = "0.1.41"
aws-config = "0.55"
aws-credential-types = "0.55"
Expand Down
10 changes: 8 additions & 2 deletions datafusion-cli/src/print_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
//! Print format variants
use arrow::csv::writer::WriterBuilder;
use arrow::json::{ArrayWriter, LineDelimitedWriter};
use arrow::util::pretty::pretty_format_batches_with_options;
use datafusion::arrow::record_batch::RecordBatch;
use datafusion::arrow::util::pretty;
use datafusion::common::format::DEFAULT_FORMAT_OPTIONS;
use datafusion::error::{DataFusionError, Result};
use std::str::FromStr;

Expand Down Expand Up @@ -75,7 +76,12 @@ impl PrintFormat {
match self {
Self::Csv => println!("{}", print_batches_with_sep(batches, b',')?),
Self::Tsv => println!("{}", print_batches_with_sep(batches, b'\t')?),
Self::Table => pretty::print_batches(batches)?,
Self::Table => {
println!(
"{}",
pretty_format_batches_with_options(batches, &DEFAULT_FORMAT_OPTIONS)?
)
}
Self::Json => println!("{}", batches_to_json!(ArrayWriter, batches)),
Self::NdJson => {
println!("{}", batches_to_json!(LineDelimitedWriter, batches))
Expand Down
22 changes: 22 additions & 0 deletions datafusion/common/src/format.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

use arrow::util::display::{DurationFormat, FormatOptions};

/// The default [`FormatOptions`] to use within DataFusion
pub const DEFAULT_FORMAT_OPTIONS: FormatOptions<'static> =
FormatOptions::new().with_duration_format(DurationFormat::Pretty);
1 change: 1 addition & 0 deletions datafusion/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub mod delta;
mod dfschema;
pub mod display;
mod error;
pub mod format;
mod functional_dependencies;
mod join_type;
pub mod parsers;
Expand Down
Loading