Skip to content

Commit

Permalink
Update rust vesion to 1.57
Browse files Browse the repository at this point in the history
  • Loading branch information
xudong963 committed Dec 3, 2021
1 parent 069449f commit 9e893dc
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ballista-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ license = "Apache-2.0"
keywords = [ "arrow", "distributed", "query", "sql" ]
edition = "2021"
publish = false
rust-version = "1.56"
rust-version = "1.57"

[dependencies]
datafusion = { path = "../datafusion" }
Expand Down
2 changes: 1 addition & 1 deletion ballista/rust/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ homepage = "https://github.com/apache/arrow-datafusion"
repository = "https://github.com/apache/arrow-datafusion"
authors = ["Apache Arrow <dev@arrow.apache.org>"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.57"

[dependencies]
ballista-core = { path = "../core", version = "0.6.0" }
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ homepage = "https://github.com/apache/arrow-datafusion"
repository = "https://github.com/apache/arrow-datafusion"
license = "Apache-2.0"
publish = false
rust-version = "1.56"
rust-version = "1.57"

[features]
simd = ["datafusion/simd"]
Expand Down
2 changes: 1 addition & 1 deletion datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ keywords = [ "arrow", "datafusion", "ballista", "query", "sql" ]
license = "Apache-2.0"
homepage = "https://github.com/apache/arrow-datafusion"
repository = "https://github.com/apache/arrow-datafusion"
rust-version = "1.56"
rust-version = "1.57"

[dependencies]
clap = "2.33"
Expand Down
2 changes: 1 addition & 1 deletion datafusion-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

FROM rust:1.56 as builder
FROM rust:1.57 as builder

COPY ./datafusion /usr/src/datafusion

Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ license = "Apache-2.0"
keywords = [ "arrow", "query", "sql" ]
edition = "2021"
publish = false
rust-version = "1.56"
rust-version = "1.57"

[[example]]
name = "avro_sql"
Expand Down
2 changes: 1 addition & 1 deletion datafusion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ include = [
"Cargo.toml",
]
edition = "2021"
rust-version = "1.56"
rust-version = "1.57"

[lib]
name = "datafusion"
Expand Down
3 changes: 2 additions & 1 deletion datafusion/src/physical_plan/datetime_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use arrow::{
};
use chrono::prelude::*;
use chrono::Duration;
use std::borrow::Borrow;

/// given a function `op` that maps a `&str` to a Result of an arrow native type,
/// returns a `PrimitiveArray` after the application
Expand Down Expand Up @@ -77,7 +78,7 @@ where
})?;

// first map is the iterator, second is for the `Option<_>`
array.iter().map(|x| x.map(|x| op(x)).transpose()).collect()
array.iter().map(|x| x.map(op.borrow()).transpose()).collect()
}

// given an function that maps a `&str` to a arrow native type,
Expand Down
4 changes: 2 additions & 2 deletions datafusion/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub enum ScalarValue {
/// large binary
LargeBinary(Option<Vec<u8>>),
/// list of nested ScalarValue (boxed to reduce size_of(ScalarValue))
#[allow(clippy::box_vec)]
#[allow(clippy::box_collection)]
List(Option<Box<Vec<ScalarValue>>>, Box<DataType>),
/// Date stored as a signed 32bit int
Date32(Option<i32>),
Expand All @@ -87,7 +87,7 @@ pub enum ScalarValue {
/// Interval with DayTime unit
IntervalDayTime(Option<i64>),
/// struct of nested ScalarValue (boxed to reduce size_of(ScalarValue))
#[allow(clippy::box_vec)]
#[allow(clippy::box_collection)]
Struct(Option<Box<Vec<ScalarValue>>>, Box<Vec<Field>>),
}

Expand Down
8 changes: 4 additions & 4 deletions datafusion/src/sql/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub struct CreateExternalTable {
#[derive(Debug, Clone, PartialEq)]
pub enum Statement {
/// ANSI SQL AST node
Statement(SQLStatement),
Statement(Box<SQLStatement>),
/// Extension: `CREATE EXTERNAL TABLE`
CreateExternalTable(CreateExternalTable),
}
Expand Down Expand Up @@ -167,13 +167,13 @@ impl<'a> DFParser<'a> {
}
_ => {
// use the native parser
Ok(Statement::Statement(self.parser.parse_statement()?))
Ok(Statement::Statement(Box::from(self.parser.parse_statement()?)))
}
}
}
_ => {
// use the native parser
Ok(Statement::Statement(self.parser.parse_statement()?))
Ok(Statement::Statement(Box::from(self.parser.parse_statement()?)))
}
}
}
Expand All @@ -183,7 +183,7 @@ impl<'a> DFParser<'a> {
if self.parser.parse_keyword(Keyword::EXTERNAL) {
self.parse_create_external_table()
} else {
Ok(Statement::Statement(self.parser.parse_create()?))
Ok(Statement::Statement(Box::from(self.parser.parse_create()?)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion dev/docker/ballista-base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


# Base image extends debian:buster-slim
FROM rust:1.56.0-buster AS builder
FROM rust:1.57.0-buster AS builder

RUN apt update && apt -y install musl musl-dev musl-tools libssl-dev openssl

Expand Down
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description = "Build and run queries against data"
readme = "README.md"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.56"
rust-version = "1.57"

[dependencies]
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync"] }
Expand Down

0 comments on commit 9e893dc

Please sign in to comment.