diff --git a/ballista-examples/Cargo.toml b/ballista-examples/Cargo.toml index 65cdec400e1d..a2d2fd65656d 100644 --- a/ballista-examples/Cargo.toml +++ b/ballista-examples/Cargo.toml @@ -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" } diff --git a/ballista/rust/client/Cargo.toml b/ballista/rust/client/Cargo.toml index f444689021d2..7736e949d29f 100644 --- a/ballista/rust/client/Cargo.toml +++ b/ballista/rust/client/Cargo.toml @@ -24,7 +24,7 @@ homepage = "https://github.com/apache/arrow-datafusion" repository = "https://github.com/apache/arrow-datafusion" authors = ["Apache Arrow "] edition = "2021" -rust-version = "1.56" +rust-version = "1.57" [dependencies] ballista-core = { path = "../core", version = "0.6.0" } diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 4fc41b33a7ec..c042778265ab 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -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"] diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml index 0434f090da01..27227507db4f 100644 --- a/datafusion-cli/Cargo.toml +++ b/datafusion-cli/Cargo.toml @@ -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" diff --git a/datafusion-cli/Dockerfile b/datafusion-cli/Dockerfile index fe177b6dcb99..fed14188fded 100644 --- a/datafusion-cli/Dockerfile +++ b/datafusion-cli/Dockerfile @@ -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 diff --git a/datafusion-examples/Cargo.toml b/datafusion-examples/Cargo.toml index 3e8a6ec77f6d..d81100f70ac7 100644 --- a/datafusion-examples/Cargo.toml +++ b/datafusion-examples/Cargo.toml @@ -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" diff --git a/datafusion/Cargo.toml b/datafusion/Cargo.toml index fbe84e3ed0a0..73ed9c08ae59 100644 --- a/datafusion/Cargo.toml +++ b/datafusion/Cargo.toml @@ -31,7 +31,7 @@ include = [ "Cargo.toml", ] edition = "2021" -rust-version = "1.56" +rust-version = "1.57" [lib] name = "datafusion" diff --git a/datafusion/src/physical_plan/datetime_expressions.rs b/datafusion/src/physical_plan/datetime_expressions.rs index a776c42f3e9d..6534aafed9e4 100644 --- a/datafusion/src/physical_plan/datetime_expressions.rs +++ b/datafusion/src/physical_plan/datetime_expressions.rs @@ -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 @@ -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, diff --git a/datafusion/src/scalar.rs b/datafusion/src/scalar.rs index 4a5a2c34a393..c06ccb1c81f3 100644 --- a/datafusion/src/scalar.rs +++ b/datafusion/src/scalar.rs @@ -68,7 +68,7 @@ pub enum ScalarValue { /// large binary LargeBinary(Option>), /// list of nested ScalarValue (boxed to reduce size_of(ScalarValue)) - #[allow(clippy::box_vec)] + #[allow(clippy::box_collection)] List(Option>>, Box), /// Date stored as a signed 32bit int Date32(Option), @@ -87,7 +87,7 @@ pub enum ScalarValue { /// Interval with DayTime unit IntervalDayTime(Option), /// struct of nested ScalarValue (boxed to reduce size_of(ScalarValue)) - #[allow(clippy::box_vec)] + #[allow(clippy::box_collection)] Struct(Option>>, Box>), } diff --git a/datafusion/src/sql/parser.rs b/datafusion/src/sql/parser.rs index 49ae86906c14..14987b79bc1d 100644 --- a/datafusion/src/sql/parser.rs +++ b/datafusion/src/sql/parser.rs @@ -85,7 +85,7 @@ pub struct CreateExternalTable { #[derive(Debug, Clone, PartialEq)] pub enum Statement { /// ANSI SQL AST node - Statement(SQLStatement), + Statement(Box), /// Extension: `CREATE EXTERNAL TABLE` CreateExternalTable(CreateExternalTable), } @@ -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()?))) } } } @@ -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()?))) } } diff --git a/dev/docker/ballista-base.dockerfile b/dev/docker/ballista-base.dockerfile index df4f32c0ce99..cf845e076016 100644 --- a/dev/docker/ballista-base.dockerfile +++ b/dev/docker/ballista-base.dockerfile @@ -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 diff --git a/python/Cargo.toml b/python/Cargo.toml index 568f3c7b35d3..974a6140644e 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -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"] }