diff --git a/Cargo.toml b/Cargo.toml index 627a50d38d78a..3e7fa5b5f668c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,7 @@ license = "Apache-2.0" readme = "README.md" repository = "https://github.com/apache/datafusion" # Define Minimum Supported Rust Version (MSRV) -rust-version = "1.82.0" +rust-version = "1.81.0" # Define DataFusion version version = "46.0.0" diff --git a/datafusion/common/src/table_reference.rs b/datafusion/common/src/table_reference.rs index 9b6f9696c00bb..bb53a30dcb234 100644 --- a/datafusion/common/src/table_reference.rs +++ b/datafusion/common/src/table_reference.rs @@ -193,7 +193,8 @@ impl TableReference { match self { TableReference::Bare { table } => **table == *other.table(), TableReference::Partial { schema, table } => { - **table == *other.table() && other.schema().is_none_or(|s| *s == **schema) + **table == *other.table() + && other.schema().map_or(true, |s| *s == **schema) } TableReference::Full { catalog, @@ -201,8 +202,8 @@ impl TableReference { table, } => { **table == *other.table() - && other.schema().is_none_or(|s| *s == **schema) - && other.catalog().is_none_or(|c| *c == **catalog) + && other.schema().map_or(true, |s| *s == **schema) + && other.catalog().map_or(true, |c| *c == **catalog) } } } diff --git a/datafusion/expr/src/utils.rs b/datafusion/expr/src/utils.rs index 3846566e27fec..b7ac5517c0b75 100644 --- a/datafusion/expr/src/utils.rs +++ b/datafusion/expr/src/utils.rs @@ -837,7 +837,7 @@ pub fn exprlist_len( .enumerate() .filter_map(|(idx, field)| { let (maybe_table_ref, _) = schema.qualified_field(idx); - if maybe_table_ref.is_none_or(|q| q == qualifier) { + if maybe_table_ref.map_or(true, |q| q == qualifier) { Some((maybe_table_ref.cloned(), Arc::clone(field))) } else { None diff --git a/datafusion/physical-expr-common/src/sort_expr.rs b/datafusion/physical-expr-common/src/sort_expr.rs index 38b820edc544e..63e1028745fa9 100644 --- a/datafusion/physical-expr-common/src/sort_expr.rs +++ b/datafusion/physical-expr-common/src/sort_expr.rs @@ -172,11 +172,13 @@ impl PhysicalSortExpr { let nullable = self.expr.nullable(schema).unwrap_or(true); self.expr.eq(&requirement.expr) && if nullable { - requirement.options.is_none_or(|opts| self.options == opts) + requirement + .options + .map_or(true, |opts| self.options == opts) } else { requirement .options - .is_none_or(|opts| self.options.descending == opts.descending) + .map_or(true, |opts| self.options.descending == opts.descending) } } } @@ -291,7 +293,7 @@ impl PhysicalSortRequirement { self.expr.eq(&other.expr) && other .options - .is_none_or(|other_opts| self.options == Some(other_opts)) + .map_or(true, |other_opts| self.options == Some(other_opts)) } #[deprecated(since = "43.0.0", note = "use LexRequirement::from_lex_ordering")] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 11f4fb798c376..bd764d2010186 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -19,5 +19,5 @@ # to compile this workspace and run CI jobs. [toolchain] -channel = "1.85.0" +channel = "1.84.1" components = ["rustfmt", "clippy"]