Skip to content

Commit 73f50f7

Browse files
authored
fix: resolve clippy warnings and formatting issues (#33)
- Update BehaviorVersion::v2025_01_17 to ::latest() to fix deprecation warning - Add missing limit field to FileScanTask test constructors in reader.rs - Apply cargo fmt formatting fixes in row_delta.rs
1 parent 878a8cb commit 73f50f7

3 files changed

Lines changed: 9 additions & 16 deletions

File tree

crates/catalog/rest/src/middleware/sigv4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl Middleware for SigV4Middleware {
106106
let config = self
107107
.config
108108
.get_or_init(|| async {
109-
let mut config_builder = aws_config::defaults(BehaviorVersion::v2025_01_17());
109+
let mut config_builder = aws_config::defaults(BehaviorVersion::latest());
110110

111111
let region = Region::new(signing_region);
112112
config_builder = config_builder.region(region.clone());

crates/iceberg/src/arrow/reader.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4225,6 +4225,7 @@ message schema {
42254225
project_field_ids: vec![1, 2],
42264226
predicate: None,
42274227
deletes: vec![],
4228+
limit: None,
42284229
partition: None,
42294230
partition_spec: None,
42304231
name_mapping: None,
@@ -4243,6 +4244,7 @@ message schema {
42434244
project_field_ids: vec![1, 2],
42444245
predicate: None,
42454246
deletes: vec![],
4247+
limit: None,
42464248
partition: None,
42474249
partition_spec: None,
42484250
name_mapping: None,
@@ -4261,6 +4263,7 @@ message schema {
42614263
project_field_ids: vec![1, 2],
42624264
predicate: None,
42634265
deletes: vec![],
4266+
limit: None,
42644267
partition: None,
42654268
partition_spec: None,
42664269
name_mapping: None,

crates/iceberg/src/transaction/row_delta.rs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,7 @@ mod tests {
219219
.unwrap()
220220
}
221221

222-
fn make_equality_delete_file(
223-
table: &crate::table::Table,
224-
path: &str,
225-
) -> crate::spec::DataFile {
222+
fn make_equality_delete_file(table: &crate::table::Table, path: &str) -> crate::spec::DataFile {
226223
DataFileBuilder::default()
227224
.content(DataContentType::EqualityDeletes)
228225
.file_path(path.to_string())
@@ -236,10 +233,7 @@ mod tests {
236233
.unwrap()
237234
}
238235

239-
fn make_position_delete_file(
240-
table: &crate::table::Table,
241-
path: &str,
242-
) -> crate::spec::DataFile {
236+
fn make_position_delete_file(table: &crate::table::Table, path: &str) -> crate::spec::DataFile {
243237
DataFileBuilder::default()
244238
.content(DataContentType::PositionDeletes)
245239
.file_path(path.to_string())
@@ -273,11 +267,9 @@ mod tests {
273267
let requirements = action_commit.take_requirements();
274268

275269
// Check updates structure
276-
assert!(
277-
matches!((&updates[0], &updates[1]),
270+
assert!(matches!((&updates[0], &updates[1]),
278271
(TableUpdate::AddSnapshot { snapshot }, TableUpdate::SetSnapshotRef { reference, ref_name })
279-
if snapshot.snapshot_id() == reference.snapshot_id && ref_name == MAIN_BRANCH)
280-
);
272+
if snapshot.snapshot_id() == reference.snapshot_id && ref_name == MAIN_BRANCH));
281273

282274
// Check operation is Delete when only delete files present
283275
let new_snapshot = if let TableUpdate::AddSnapshot { snapshot } = &updates[0] {
@@ -453,9 +445,7 @@ mod tests {
453445
Err(e) => e.to_string(),
454446
Ok(_) => panic!("Expected error for V1 delete files"),
455447
};
456-
assert!(
457-
err_msg.contains("not supported in format version 1")
458-
);
448+
assert!(err_msg.contains("not supported in format version 1"));
459449
}
460450

461451
#[tokio::test]

0 commit comments

Comments
 (0)