Skip to content

Commit 97a5d95

Browse files
committed
datafusion: bump MSRV
1 parent 111d0ef commit 97a5d95

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ homepage = "https://datafusion.apache.org"
5757
license = "Apache-2.0"
5858
readme = "README.md"
5959
repository = "https://github.com/apache/datafusion"
60-
rust-version = "1.76"
60+
rust-version = "1.82.0"
6161
version = "42.2.0"
6262

6363
[workspace.dependencies]

datafusion/common/src/table_reference.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,16 @@ impl TableReference {
193193
match self {
194194
TableReference::Bare { table } => **table == *other.table(),
195195
TableReference::Partial { schema, table } => {
196-
**table == *other.table()
197-
&& other.schema().map_or(true, |s| *s == **schema)
196+
**table == *other.table() && other.schema().is_none_or(|s| *s == **schema)
198197
}
199198
TableReference::Full {
200199
catalog,
201200
schema,
202201
table,
203202
} => {
204203
**table == *other.table()
205-
&& other.schema().map_or(true, |s| *s == **schema)
206-
&& other.catalog().map_or(true, |c| *c == **catalog)
204+
&& other.schema().is_none_or(|s| *s == **schema)
205+
&& other.catalog().is_none_or(|c| *c == **catalog)
207206
}
208207
}
209208
}

datafusion/expr/src/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ pub fn exprlist_len(
811811
.enumerate()
812812
.filter_map(|(idx, field)| {
813813
let (maybe_table_ref, _) = schema.qualified_field(idx);
814-
if maybe_table_ref.map_or(true, |q| q == qualifier) {
814+
if maybe_table_ref.is_none_or(|q| q == qualifier) {
815815
Some((maybe_table_ref.cloned(), Arc::clone(field)))
816816
} else {
817817
None

datafusion/physical-expr-common/src/sort_expr.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ impl PhysicalSortExpr {
9292
let nullable = self.expr.nullable(schema).unwrap_or(true);
9393
self.expr.eq(&requirement.expr)
9494
&& if nullable {
95-
requirement
96-
.options
97-
.map_or(true, |opts| self.options == opts)
95+
requirement.options.is_none_or(|opts| self.options == opts)
9896
} else {
9997
requirement
10098
.options
101-
.map_or(true, |opts| self.options.descending == opts.descending)
99+
.is_none_or(|opts| self.options.descending == opts.descending)
102100
}
103101
}
104102

@@ -209,7 +207,7 @@ impl PhysicalSortRequirement {
209207
self.expr.eq(&other.expr)
210208
&& other
211209
.options
212-
.map_or(true, |other_opts| self.options == Some(other_opts))
210+
.is_none_or(|other_opts| self.options == Some(other_opts))
213211
}
214212

215213
/// Returns [`PhysicalSortRequirement`] that requires the exact

0 commit comments

Comments
 (0)