You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by sc...@apache.org on 2026/08/27 22:32:11 UTC
(iceberg-rust) branch main updated: chore: Update MSRV to Rust 1.95 (#3083)
This is an automated email from the ASF dual-hosted git repository.
CTTY pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new 4382ebe12 chore: Update MSRV to Rust 1.95 (#3083)
4382ebe12 is described below
commit 4382ebe12fd746b6796d6113497a9e3d6c6ec975
Author: Daniel Carl Jones <dj...@amazon.com>
AuthorDate: Thu Aug 27 23:32:05 2026 +0100
chore: Update MSRV to Rust 1.95 (#3083)
---
Cargo.toml | 2 +-
crates/catalog/glue/src/catalog.rs | 2 +-
crates/catalog/glue/src/schema.rs | 2 +-
crates/iceberg/src/arrow/schema.rs | 2 +-
crates/iceberg/src/arrow/value.rs | 4 +-
.../src/expr/visitors/bound_predicate_visitor.rs | 6 +--
.../src/expr/visitors/expression_evaluator.rs | 34 +++++++++-------
.../src/expr/visitors/manifest_evaluator.rs | 8 ++--
.../src/expr/visitors/page_index_evaluator.rs | 15 +++++---
.../iceberg/src/expr/visitors/predicate_visitor.rs | 6 +--
.../expr/visitors/row_group_metrics_evaluator.rs | 45 ++++++++++++----------
.../src/expr/visitors/strict_metrics_evaluator.rs | 4 +-
crates/iceberg/src/spec/manifest/mod.rs | 8 ++--
crates/iceberg/src/spec/manifest_list/mod.rs | 4 +-
crates/iceberg/src/spec/schema/mod.rs | 4 +-
crates/iceberg/src/spec/values/datum.rs | 2 +-
crates/iceberg/src/spec/values/serde.rs | 2 +-
crates/iceberg/src/spec/values/tests.rs | 28 +++++++-------
.../src/writer/file_writer/parquet_writer.rs | 24 ++++++------
crates/sqllogictest/src/schedule.rs | 2 +-
rust-toolchain.toml | 2 +-
21 files changed, 110 insertions(+), 96 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 38dd546f9..cea9ede78 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,7 +39,7 @@ version = "0.10.0"
license = "Apache-2.0"
repository = "https://github.com/apache/iceberg-rust"
# Check the MSRV policy in README.md before changing this
-rust-version = "1.94"
+rust-version = "1.95"
[workspace.lints.rust]
unused_qualifications = "deny"
diff --git a/crates/catalog/glue/src/catalog.rs b/crates/catalog/glue/src/catalog.rs
index 48fc6bb01..721fbb548 100644
--- a/crates/catalog/glue/src/catalog.rs
+++ b/crates/catalog/glue/src/catalog.rs
@@ -539,7 +539,7 @@ impl Catalog for GlueCatalog {
if !resp.table_list().is_empty() {
return Err(Error::new(
ErrorKind::DataInvalid,
- format!("Database with name: {} is not empty", &db_name),
+ format!("Database with name: {} is not empty", db_name),
));
}
diff --git a/crates/catalog/glue/src/schema.rs b/crates/catalog/glue/src/schema.rs
index 59d51f3dc..6a33a9cba 100644
--- a/crates/catalog/glue/src/schema.rs
+++ b/crates/catalog/glue/src/schema.rs
@@ -103,7 +103,7 @@ impl SchemaVisitor for GlueSchemaBuilder {
fn field(&mut self, field: &iceberg::spec::NestedFieldRef, value: String) -> Result<String> {
if self.is_inside_struct() {
- return Ok(format!("{}:{}", field.name, &value));
+ return Ok(format!("{}:{}", field.name, value));
}
let parameters = HashMap::from([
diff --git a/crates/iceberg/src/arrow/schema.rs b/crates/iceberg/src/arrow/schema.rs
index ae5cbb817..349ada859 100644
--- a/crates/iceberg/src/arrow/schema.rs
+++ b/crates/iceberg/src/arrow/schema.rs
@@ -2388,7 +2388,7 @@ mod tests {
assert_eq!(array.value(0), 42);
}
{
- let datum = Datum::float(42.42);
+ let datum = Datum::float(42.42_f32);
let arrow_datum = get_arrow_datum(&datum).unwrap();
let (array, is_scalar) = arrow_datum.get();
let array = array.as_any().downcast_ref::<Float32Array>().unwrap();
diff --git a/crates/iceberg/src/arrow/value.rs b/crates/iceberg/src/arrow/value.rs
index a19771a3d..34b4336ef 100644
--- a/crates/iceberg/src/arrow/value.rs
+++ b/crates/iceberg/src/arrow/value.rs
@@ -1201,7 +1201,7 @@ mod test {
Some(Literal::bool(true)),
Some(Literal::int(3)),
Some(Literal::long(5)),
- Some(Literal::float(1.1)),
+ Some(Literal::float(1.1_f32)),
Some(Literal::double(3.3)),
Some(Literal::decimal(1000)),
Some(Literal::date(18628)),
@@ -1215,7 +1215,7 @@ mod test {
Some(Literal::bool(false)),
Some(Literal::int(4)),
Some(Literal::long(6)),
- Some(Literal::float(2.2)),
+ Some(Literal::float(2.2_f32)),
Some(Literal::double(4.4)),
Some(Literal::decimal(2000)),
Some(Literal::date(18629)),
diff --git a/crates/iceberg/src/expr/visitors/bound_predicate_visitor.rs b/crates/iceberg/src/expr/visitors/bound_predicate_visitor.rs
index 22f6d08ad..1d7816dcf 100644
--- a/crates/iceberg/src/expr/visitors/bound_predicate_visitor.rs
+++ b/crates/iceberg/src/expr/visitors/bound_predicate_visitor.rs
@@ -185,7 +185,7 @@ pub(crate) fn visit<V: BoundPredicateVisitor>(
PredicateOperator::IsNan => visitor.is_nan(expr.term(), predicate),
PredicateOperator::NotNan => visitor.not_nan(expr.term(), predicate),
op => {
- panic!("Unexpected op for unary predicate: {}", &op)
+ panic!("Unexpected op for unary predicate: {}", op)
}
},
BoundPredicate::Binary(expr) => {
@@ -209,7 +209,7 @@ pub(crate) fn visit<V: BoundPredicateVisitor>(
visitor.not_starts_with(reference, literal, predicate)
}
op => {
- panic!("Unexpected op for binary predicate: {}", &op)
+ panic!("Unexpected op for binary predicate: {}", op)
}
}
}
@@ -220,7 +220,7 @@ pub(crate) fn visit<V: BoundPredicateVisitor>(
PredicateOperator::In => visitor.r#in(reference, literals, predicate),
PredicateOperator::NotIn => visitor.not_in(reference, literals, predicate),
op => {
- panic!("Unexpected op for set predicate: {}", &op)
+ panic!("Unexpected op for set predicate: {}", op)
}
}
}
diff --git a/crates/iceberg/src/expr/visitors/expression_evaluator.rs b/crates/iceberg/src/expr/visitors/expression_evaluator.rs
index 570c40950..122f19589 100644
--- a/crates/iceberg/src/expr/visitors/expression_evaluator.rs
+++ b/crates/iceberg/src/expr/visitors/expression_evaluator.rs
@@ -330,7 +330,7 @@ mod tests {
}
fn create_data_file_float() -> DataFile {
- let partition = Struct::from_iter([Some(Literal::float(1.0))]);
+ let partition = Struct::from_iter([Some(Literal::float(1.0_f32))]);
DataFile {
content: DataContentType::Data,
@@ -393,12 +393,12 @@ mod tests {
let predicate = Predicate::Binary(BinaryExpression::new(
PredicateOperator::LessThan,
Reference::new("a"),
- Datum::float(1.0),
+ Datum::float(1.0_f32),
))
.or(Predicate::Binary(BinaryExpression::new(
PredicateOperator::GreaterThanOrEq,
Reference::new("a"),
- Datum::float(0.4),
+ Datum::float(0.4_f32),
)))
.bind(schema.clone(), case_sensitive)?;
@@ -422,12 +422,12 @@ mod tests {
let predicate = Predicate::Binary(BinaryExpression::new(
PredicateOperator::LessThan,
Reference::new("a"),
- Datum::float(1.1),
+ Datum::float(1.1_f32),
))
.and(Predicate::Binary(BinaryExpression::new(
PredicateOperator::GreaterThanOrEq,
Reference::new("a"),
- Datum::float(0.4),
+ Datum::float(0.4_f32),
)))
.bind(schema.clone(), case_sensitive)?;
@@ -451,7 +451,11 @@ mod tests {
let predicate = Predicate::Set(SetExpression::new(
PredicateOperator::NotIn,
Reference::new("a"),
- FnvHashSet::from_iter([Datum::float(0.9), Datum::float(1.2), Datum::float(2.4)]),
+ FnvHashSet::from_iter([
+ Datum::float(0.9_f32),
+ Datum::float(1.2_f32),
+ Datum::float(2.4_f32),
+ ]),
))
.bind(schema.clone(), case_sensitive)?;
@@ -475,7 +479,11 @@ mod tests {
let predicate = Predicate::Set(SetExpression::new(
PredicateOperator::In,
Reference::new("a"),
- FnvHashSet::from_iter([Datum::float(1.0), Datum::float(1.2), Datum::float(2.4)]),
+ FnvHashSet::from_iter([
+ Datum::float(1.0_f32),
+ Datum::float(1.2_f32),
+ Datum::float(2.4_f32),
+ ]),
))
.bind(schema.clone(), case_sensitive)?;
@@ -547,7 +555,7 @@ mod tests {
let predicate = Predicate::Binary(BinaryExpression::new(
PredicateOperator::NotEq,
Reference::new("a"),
- Datum::float(0.9),
+ Datum::float(0.9_f32),
))
.bind(schema.clone(), case_sensitive)?;
@@ -571,7 +579,7 @@ mod tests {
let predicate = Predicate::Binary(BinaryExpression::new(
PredicateOperator::Eq,
Reference::new("a"),
- Datum::float(1.0),
+ Datum::float(1.0_f32),
))
.bind(schema.clone(), case_sensitive)?;
@@ -595,7 +603,7 @@ mod tests {
let predicate = Predicate::Binary(BinaryExpression::new(
PredicateOperator::GreaterThanOrEq,
Reference::new("a"),
- Datum::float(1.0),
+ Datum::float(1.0_f32),
))
.bind(schema.clone(), case_sensitive)?;
@@ -619,7 +627,7 @@ mod tests {
let predicate = Predicate::Binary(BinaryExpression::new(
PredicateOperator::GreaterThan,
Reference::new("a"),
- Datum::float(0.9),
+ Datum::float(0.9_f32),
))
.bind(schema.clone(), case_sensitive)?;
@@ -643,7 +651,7 @@ mod tests {
let predicate = Predicate::Binary(BinaryExpression::new(
PredicateOperator::LessThanOrEq,
Reference::new("a"),
- Datum::float(1.0),
+ Datum::float(1.0_f32),
))
.bind(schema.clone(), case_sensitive)?;
@@ -667,7 +675,7 @@ mod tests {
let predicate = Predicate::Binary(BinaryExpression::new(
PredicateOperator::LessThan,
Reference::new("a"),
- Datum::float(1.1),
+ Datum::float(1.1_f32),
))
.bind(schema.clone(), case_sensitive)?;
diff --git a/crates/iceberg/src/expr/visitors/manifest_evaluator.rs b/crates/iceberg/src/expr/visitors/manifest_evaluator.rs
index 243b31757..53dbafc06 100644
--- a/crates/iceberg/src/expr/visitors/manifest_evaluator.rs
+++ b/crates/iceberg/src/expr/visitors/manifest_evaluator.rs
@@ -612,8 +612,8 @@ mod test {
FieldSummary {
contains_null: true,
contains_nan: None,
- lower_bound: Some(Datum::float(0.0).to_bytes().unwrap()),
- upper_bound: Some(Datum::float(20.0).to_bytes().unwrap()),
+ lower_bound: Some(Datum::float(0.0_f32).to_bytes().unwrap()),
+ upper_bound: Some(Datum::float(20.0_f32).to_bytes().unwrap()),
},
// all_nulls_double
FieldSummary {
@@ -647,8 +647,8 @@ mod test {
FieldSummary {
contains_null: false,
contains_nan: Some(false),
- lower_bound: Some(Datum::float(0.0).to_bytes().unwrap()),
- upper_bound: Some(Datum::float(20.0).to_bytes().unwrap()),
+ lower_bound: Some(Datum::float(0.0_f32).to_bytes().unwrap()),
+ upper_bound: Some(Datum::float(20.0_f32).to_bytes().unwrap()),
},
// all_nulls_missing_nan_float
FieldSummary {
diff --git a/crates/iceberg/src/expr/visitors/page_index_evaluator.rs b/crates/iceberg/src/expr/visitors/page_index_evaluator.rs
index f30760d5f..bd901eda5 100644
--- a/crates/iceberg/src/expr/visitors/page_index_evaluator.rs
+++ b/crates/iceberg/src/expr/visitors/page_index_evaluator.rs
@@ -941,7 +941,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .greater_than(Datum::float(1.0))
+ .greater_than(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let row_group_metadata = metadata.row_group(0);
@@ -1103,7 +1103,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .less_than(Datum::float(5.0))
+ .less_than(Datum::float(5.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = PageIndexEvaluator::eval(
@@ -1133,7 +1133,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .equal_to(Datum::float(5.0))
+ .equal_to(Datum::float(5.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = PageIndexEvaluator::eval(
@@ -1166,7 +1166,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .not_equal_to(Datum::float(5.0))
+ .not_equal_to(Datum::float(5.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = PageIndexEvaluator::eval(
@@ -1192,7 +1192,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .starts_with(Datum::float(5.0))
+ .starts_with(Datum::float(5.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = PageIndexEvaluator::eval(
@@ -1284,7 +1284,10 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .is_in(std::iter::repeat_with(|| Datum::float(rng.random_range(0.0..10.0))).take(1000))
+ .is_in(
+ std::iter::repeat_with(|| Datum::float(rng.random_range(0.0_f32..10.0_f32)))
+ .take(1000),
+ )
.bind(iceberg_schema_ref.clone(), false)?;
let result = PageIndexEvaluator::eval(
diff --git a/crates/iceberg/src/expr/visitors/predicate_visitor.rs b/crates/iceberg/src/expr/visitors/predicate_visitor.rs
index 61671cc2c..1fa94e7f8 100644
--- a/crates/iceberg/src/expr/visitors/predicate_visitor.rs
+++ b/crates/iceberg/src/expr/visitors/predicate_visitor.rs
@@ -169,7 +169,7 @@ pub(crate) fn visit<V: PredicateVisitor>(visitor: &mut V, predicate: &Predicate)
PredicateOperator::IsNan => visitor.is_nan(expr.term(), predicate),
PredicateOperator::NotNan => visitor.not_nan(expr.term(), predicate),
op => {
- panic!("Unexpected op for unary predicate: {}", &op)
+ panic!("Unexpected op for unary predicate: {}", op)
}
},
Predicate::Binary(expr) => {
@@ -193,7 +193,7 @@ pub(crate) fn visit<V: PredicateVisitor>(visitor: &mut V, predicate: &Predicate)
visitor.not_starts_with(reference, literal, predicate)
}
op => {
- panic!("Unexpected op for binary predicate: {}", &op)
+ panic!("Unexpected op for binary predicate: {}", op)
}
}
}
@@ -204,7 +204,7 @@ pub(crate) fn visit<V: PredicateVisitor>(visitor: &mut V, predicate: &Predicate)
PredicateOperator::In => visitor.r#in(reference, literals, predicate),
PredicateOperator::NotIn => visitor.not_in(reference, literals, predicate),
op => {
- panic!("Unexpected op for set predicate: {}", &op)
+ panic!("Unexpected op for set predicate: {}", op)
}
}
}
diff --git a/crates/iceberg/src/expr/visitors/row_group_metrics_evaluator.rs b/crates/iceberg/src/expr/visitors/row_group_metrics_evaluator.rs
index ad7e19f54..3a5a406e7 100644
--- a/crates/iceberg/src/expr/visitors/row_group_metrics_evaluator.rs
+++ b/crates/iceberg/src/expr/visitors/row_group_metrics_evaluator.rs
@@ -117,7 +117,7 @@ impl<'a> RowGroupMetricsEvaluator<'a> {
ErrorKind::Unexpected,
format!(
"Could not find a field with id '{}' in the snapshot schema",
- &field_id
+ field_id
),
));
};
@@ -127,7 +127,7 @@ impl<'a> RowGroupMetricsEvaluator<'a> {
ErrorKind::Unexpected,
format!(
"Could not determine the PrimitiveType for field id '{}'",
- &field_id
+ field_id
),
));
};
@@ -542,7 +542,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .greater_than(Datum::float(1.0))
+ .greater_than(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -564,7 +564,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .greater_than(Datum::float(1.0))
+ .greater_than(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -700,7 +700,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .greater_than(Datum::float(1.0))
+ .greater_than(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -760,7 +760,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .greater_than(Datum::float(1.0))
+ .greater_than(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -793,7 +793,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .greater_than(Datum::float(1.0))
+ .greater_than(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -826,7 +826,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .greater_than(Datum::float(1.0))
+ .greater_than(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -853,7 +853,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .equal_to(Datum::float(1.0))
+ .equal_to(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -886,7 +886,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .equal_to(Datum::float(1.0))
+ .equal_to(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -919,7 +919,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .equal_to(Datum::float(1.0))
+ .equal_to(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -952,7 +952,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .equal_to(Datum::float(1.0))
+ .equal_to(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -985,7 +985,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .equal_to(Datum::float(1.0))
+ .equal_to(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -1018,7 +1018,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .equal_to(Datum::float(1.0))
+ .equal_to(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -1051,7 +1051,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .not_equal_to(Datum::float(1.0))
+ .not_equal_to(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -1105,7 +1105,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .starts_with(Datum::float(1.0))
+ .starts_with(Datum::float(1.0_f32))
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -1636,7 +1636,10 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .is_in(std::iter::repeat_with(|| Datum::float(rng.random_range(0.0..10.0))).take(1000))
+ .is_in(
+ std::iter::repeat_with(|| Datum::float(rng.random_range(0.0_f32..10.0_f32)))
+ .take(1000),
+ )
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -1698,7 +1701,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .is_in([Datum::float(2.0), Datum::float(3.0)])
+ .is_in([Datum::float(2.0_f32), Datum::float(3.0_f32)])
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -1725,7 +1728,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .is_in([Datum::float(2.0), Datum::float(3.0)])
+ .is_in([Datum::float(2.0_f32), Datum::float(3.0_f32)])
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -1758,7 +1761,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .is_in([Datum::float(2.0), Datum::float(3.0)])
+ .is_in([Datum::float(2.0_f32), Datum::float(3.0_f32)])
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
@@ -1791,7 +1794,7 @@ mod tests {
let (iceberg_schema_ref, field_id_map) = build_iceberg_schema_and_field_map()?;
let filter = Reference::new("col_float")
- .is_in([Datum::float(2.0), Datum::float(3.0)])
+ .is_in([Datum::float(2.0_f32), Datum::float(3.0_f32)])
.bind(iceberg_schema_ref.clone(), false)?;
let result = RowGroupMetricsEvaluator::eval(
diff --git a/crates/iceberg/src/expr/visitors/strict_metrics_evaluator.rs b/crates/iceberg/src/expr/visitors/strict_metrics_evaluator.rs
index 0371f547f..9fe8f216c 100644
--- a/crates/iceberg/src/expr/visitors/strict_metrics_evaluator.rs
+++ b/crates/iceberg/src/expr/visitors/strict_metrics_evaluator.rs
@@ -27,15 +27,15 @@ const ROWS_MUST_MATCH: Result<bool> = Ok(true);
#[allow(dead_code)]
const ROWS_MIGHT_NOT_MATCH: Result<bool> = Ok(false);
-#[allow(dead_code)]
/// Evaluates an `Expression` on a `DataFile` to test whether all rows in the file match.
-///
+///
/// This evaluation is strict: it returns true if all rows in a file must match the expression.
/// For example, if a file's ts column has min X and max Y, this evaluator will return true for ts
/// < Y+1 but not for ts < Y-1.
///
/// Files are passed to `eval(DataFile)`, which returns true if all rows in the file
/// must contain matching rows and false if the file may contain rows that do not match.
+#[allow(dead_code)]
pub(crate) struct StrictMetricsEvaluator<'a> {
data_file: &'a DataFile,
}
diff --git a/crates/iceberg/src/spec/manifest/mod.rs b/crates/iceberg/src/spec/manifest/mod.rs
index 9156914aa..f05eeae77 100644
--- a/crates/iceberg/src/spec/manifest/mod.rs
+++ b/crates/iceberg/src/spec/manifest/mod.rs
@@ -1034,7 +1034,7 @@ mod tests {
partition: Struct::from_iter(
vec![
Some(Literal::int(2021)),
- Some(Literal::float(1.0)),
+ Some(Literal::float(1.0_f32)),
Some(Literal::double(2.0)),
]
),
@@ -1069,7 +1069,7 @@ mod tests {
partition: Struct::from_iter(
vec![
Some(Literal::int(1111)),
- Some(Literal::float(15.5)),
+ Some(Literal::float(15.5_f32)),
Some(Literal::double(25.5)),
]
),
@@ -1197,11 +1197,11 @@ mod tests {
assert_eq!(
partitions[1].clone().lower_bound.unwrap(),
- Datum::float(1.0).to_bytes().unwrap()
+ Datum::float(1.0_f32).to_bytes().unwrap()
);
assert_eq!(
partitions[1].clone().upper_bound.unwrap(),
- Datum::float(15.5).to_bytes().unwrap()
+ Datum::float(15.5_f32).to_bytes().unwrap()
);
assert!(partitions[1].clone().contains_null);
assert_eq!(partitions[1].clone().contains_nan, Some(true));
diff --git a/crates/iceberg/src/spec/manifest_list/mod.rs b/crates/iceberg/src/spec/manifest_list/mod.rs
index ae80eeb7f..25dd5bb93 100644
--- a/crates/iceberg/src/spec/manifest_list/mod.rs
+++ b/crates/iceberg/src/spec/manifest_list/mod.rs
@@ -196,7 +196,7 @@ mod test {
existing_rows_count: Some(0),
deleted_rows_count: Some(0),
partitions: Some(
- vec![FieldSummary { contains_null: false, contains_nan: Some(false), lower_bound: Some(Datum::float(1.1).to_bytes().unwrap()), upper_bound: Some(Datum::float(2.1).to_bytes().unwrap())}]
+ vec![FieldSummary { contains_null: false, contains_nan: Some(false), lower_bound: Some(Datum::float(1.1_f32).to_bytes().unwrap()), upper_bound: Some(Datum::float(2.1_f32).to_bytes().unwrap())}]
),
key_metadata: None,
first_row_id: None,
@@ -314,7 +314,7 @@ mod test {
existing_rows_count: Some(0),
deleted_rows_count: Some(0),
partitions: Some(
- vec![FieldSummary { contains_null: false, contains_nan: Some(false), lower_bound: Some(Datum::float(1.1).to_bytes().unwrap()), upper_bound: Some(Datum::float(2.1).to_bytes().unwrap())}]
+ vec![FieldSummary { contains_null: false, contains_nan: Some(false), lower_bound: Some(Datum::float(1.1_f32).to_bytes().unwrap()), upper_bound: Some(Datum::float(2.1_f32).to_bytes().unwrap())}]
),
key_metadata: None,
first_row_id: Some(13),
diff --git a/crates/iceberg/src/spec/schema/mod.rs b/crates/iceberg/src/spec/schema/mod.rs
index 708f91d60..35af6f0f8 100644
--- a/crates/iceberg/src/spec/schema/mod.rs
+++ b/crates/iceberg/src/spec/schema/mod.rs
@@ -1240,8 +1240,8 @@ table {
)]))),
Some(Literal::List(vec![Some(Literal::Struct(
crate::spec::Struct::from_iter(vec![
- Some(Literal::float(52.509_09)),
- Some(Literal::float(-1.885_249)),
+ Some(Literal::float(52.509_09_f32)),
+ Some(Literal::float(-1.885_249_f32)),
]),
))])),
Some(Literal::Struct(crate::spec::Struct::from_iter(vec![
diff --git a/crates/iceberg/src/spec/values/datum.rs b/crates/iceberg/src/spec/values/datum.rs
index 51da5d4e3..d5eccd832 100644
--- a/crates/iceberg/src/spec/values/datum.rs
+++ b/crates/iceberg/src/spec/values/datum.rs
@@ -456,7 +456,7 @@ impl Datum {
ErrorKind::DataInvalid,
format!(
"PrimitiveLiteral Int128 must be PrimitiveType Decimal but got {}",
- &self.r#type
+ self.r#type
),
));
};
diff --git a/crates/iceberg/src/spec/values/serde.rs b/crates/iceberg/src/spec/values/serde.rs
index 053acca8b..10a815aa4 100644
--- a/crates/iceberg/src/spec/values/serde.rs
+++ b/crates/iceberg/src/spec/values/serde.rs
@@ -681,7 +681,7 @@ pub(crate) mod _serde {
.ok_or_else(|| {
invalid_err_with_reason(
"record",
- &format!("field {} is not exist", &field_name),
+ &format!("field {} is not exist", field_name),
)
})?;
let value = value.try_into(&field.field_type)?;
diff --git a/crates/iceberg/src/spec/values/tests.rs b/crates/iceberg/src/spec/values/tests.rs
index 8bf331100..5ee4ac8d0 100644
--- a/crates/iceberg/src/spec/values/tests.rs
+++ b/crates/iceberg/src/spec/values/tests.rs
@@ -458,7 +458,7 @@ fn avro_bytes_long_from_int() {
fn avro_bytes_float() {
let bytes = vec![0u8, 0u8, 128u8, 63u8];
- check_avro_bytes_serde(bytes, Datum::float(1.0), &PrimitiveType::Float);
+ check_avro_bytes_serde(bytes, Datum::float(1.0_f32), &PrimitiveType::Float);
}
#[test]
@@ -1077,7 +1077,7 @@ fn test_datum_ser_deser() {
let datum = Datum::long(1);
test_fn(datum);
- let datum = Datum::float(1.0);
+ let datum = Datum::float(1.0_f32);
test_fn(datum);
let datum = Datum::float(0_f32);
test_fn(datum);
@@ -1200,7 +1200,7 @@ fn test_datum_double_convert_to_float() {
let result = datum.to(&Primitive(PrimitiveType::Float)).unwrap();
- let expected = Datum::float(2.5);
+ let expected = Datum::float(2.5_f32);
assert_eq!(result, expected);
}
@@ -1229,7 +1229,7 @@ fn test_datum_double_convert_to_float_below_min() {
#[test]
fn test_datum_float_convert_to_double() {
- let datum = Datum::float(2.5);
+ let datum = Datum::float(2.5_f32);
let result = datum.to(&Primitive(PrimitiveType::Double)).unwrap();
@@ -1358,10 +1358,10 @@ fn test_iceberg_float_order() {
Datum::float(f32::MIN),
Datum::float(f32::INFINITY),
Datum::float(-f32::INFINITY),
- Datum::float(1.0),
- Datum::float(-1.0),
- Datum::float(0.0),
- Datum::float(-0.0),
+ Datum::float(1.0_f32),
+ Datum::float(-1.0_f32),
+ Datum::float(0.0_f32),
+ Datum::float(-0.0_f32),
];
let mut float_sorted = float_values.clone();
@@ -1371,10 +1371,10 @@ fn test_iceberg_float_order() {
Datum::float(-f32::NAN),
Datum::float(-f32::INFINITY),
Datum::float(f32::MIN),
- Datum::float(-1.0),
- Datum::float(-0.0),
- Datum::float(0.0),
- Datum::float(1.0),
+ Datum::float(-1.0_f32),
+ Datum::float(-0.0_f32),
+ Datum::float(0.0_f32),
+ Datum::float(1.0_f32),
Datum::float(f32::MAX),
Datum::float(f32::INFINITY),
Datum::float(f32::NAN),
@@ -1418,8 +1418,8 @@ fn test_iceberg_float_order() {
#[test]
fn test_negative_zero_less_than_positive_zero() {
{
- let neg_zero = Datum::float(-0.0);
- let pos_zero = Datum::float(0.0);
+ let neg_zero = Datum::float(-0.0_f32);
+ let pos_zero = Datum::float(0.0_f32);
assert_eq!(
neg_zero.partial_cmp(&pos_zero),
diff --git a/crates/iceberg/src/writer/file_writer/parquet_writer.rs b/crates/iceberg/src/writer/file_writer/parquet_writer.rs
index 95654c89a..2d9ef2077 100644
--- a/crates/iceberg/src/writer/file_writer/parquet_writer.rs
+++ b/crates/iceberg/src/writer/file_writer/parquet_writer.rs
@@ -1489,7 +1489,7 @@ mod tests {
(0, Datum::bool(false)),
(1, Datum::int(1)),
(2, Datum::long(1)),
- (3, Datum::float(0.5)),
+ (3, Datum::float(0.5_f32)),
(4, Datum::double(0.5)),
(5, Datum::string("a")),
(6, Datum::binary(vec![])),
@@ -1529,7 +1529,7 @@ mod tests {
(0, Datum::bool(true)),
(1, Datum::int(4)),
(2, Datum::long(4)),
- (3, Datum::float(3.5)),
+ (3, Datum::float(3.5_f32)),
(4, Datum::double(3.5)),
(5, Datum::string("d")),
(6, Datum::binary(vec![122, 122, 122, 122])),
@@ -1938,11 +1938,11 @@ mod tests {
assert_eq!(*data_file.value_counts(), HashMap::from([(0, 4), (1, 4)]));
assert_eq!(
*data_file.lower_bounds(),
- HashMap::from([(0, Datum::float(1.0)), (1, Datum::double(1.0)),])
+ HashMap::from([(0, Datum::float(1.0_f32)), (1, Datum::double(1.0)),])
);
assert_eq!(
*data_file.upper_bounds(),
- HashMap::from([(0, Datum::float(2.0)), (1, Datum::double(2.0)),])
+ HashMap::from([(0, Datum::float(2.0_f32)), (1, Datum::double(2.0)),])
);
assert_eq!(
*data_file.null_value_counts(),
@@ -2078,11 +2078,11 @@ mod tests {
assert_eq!(*data_file.value_counts(), HashMap::from([(4, 4), (7, 4)]));
assert_eq!(
*data_file.lower_bounds(),
- HashMap::from([(4, Datum::float(1.0)), (7, Datum::float(1.0)),])
+ HashMap::from([(4, Datum::float(1.0_f32)), (7, Datum::float(1.0_f32)),])
);
assert_eq!(
*data_file.upper_bounds(),
- HashMap::from([(4, Datum::float(2.0)), (7, Datum::float(2.0)),])
+ HashMap::from([(4, Datum::float(2.0_f32)), (7, Datum::float(2.0_f32)),])
);
assert_eq!(
*data_file.null_value_counts(),
@@ -2242,11 +2242,11 @@ mod tests {
assert_eq!(*data_file.value_counts(), HashMap::from([(1, 4), (4, 4)]));
assert_eq!(
*data_file.lower_bounds(),
- HashMap::from([(1, Datum::float(1.0)), (4, Datum::float(1.0))])
+ HashMap::from([(1, Datum::float(1.0_f32)), (4, Datum::float(1.0_f32))])
);
assert_eq!(
*data_file.upper_bounds(),
- HashMap::from([(1, Datum::float(2.0)), (4, Datum::float(2.0))])
+ HashMap::from([(1, Datum::float(2.0_f32)), (4, Datum::float(2.0_f32))])
);
assert_eq!(
*data_file.null_value_counts(),
@@ -2428,18 +2428,18 @@ mod tests {
*data_file.lower_bounds(),
HashMap::from([
(1, Datum::int(1)),
- (2, Datum::float(1.0)),
+ (2, Datum::float(1.0_f32)),
(6, Datum::int(1)),
- (7, Datum::float(1.0))
+ (7, Datum::float(1.0_f32))
])
);
assert_eq!(
*data_file.upper_bounds(),
HashMap::from([
(1, Datum::int(4)),
- (2, Datum::float(2.0)),
+ (2, Datum::float(2.0_f32)),
(6, Datum::int(4)),
- (7, Datum::float(2.0))
+ (7, Datum::float(2.0_f32))
])
);
assert_eq!(
diff --git a/crates/sqllogictest/src/schedule.rs b/crates/sqllogictest/src/schedule.rs
index 25728a296..29e37c5c7 100644
--- a/crates/sqllogictest/src/schedule.rs
+++ b/crates/sqllogictest/src/schedule.rs
@@ -110,7 +110,7 @@ impl Schedule {
let step_sql_path = PathBuf::from(format!(
"{}/testdata/slts/{}",
env!("CARGO_MANIFEST_DIR"),
- &step.slt
+ step.slt
));
engine.run_slt_file(&step_sql_path).await?;
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 217e2256b..359cdaf68 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -20,5 +20,5 @@
#
# The channel is exactly same day for our MSRV.
[toolchain]
-channel = "nightly-2026-03-05"
+channel = "nightly-2026-04-16"
components = ["rustfmt", "clippy"]