Skip to content

Commit f21f5d6

Browse files
committed
lint
1 parent 5754e00 commit f21f5d6

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

icechunk/src/repository.rs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ mod tests {
14951495
let new_repo =
14961496
reopen_repo_with_new_splitting_config(&repository, Some(split_sizes));
14971497

1498-
rewrite_manifests(
1498+
let snap = rewrite_manifests(
14991499
&new_repo,
15001500
"main",
15011501
"rewrite_manifests with split-size=12",
@@ -1505,6 +1505,13 @@ mod tests {
15051505
total_manifests += 1;
15061506
assert_manifest_count(&storage, total_manifests).await;
15071507
validate_data().await;
1508+
assert!(
1509+
repository
1510+
.lookup_snapshot(&snap)
1511+
.await?
1512+
.metadata
1513+
.contains_key("splitting_config")
1514+
);
15081515

15091516
// split manifests to smaller sizes
15101517
let split_sizes = vec![(
@@ -1518,11 +1525,23 @@ mod tests {
15181525
let new_repo =
15191526
reopen_repo_with_new_splitting_config(&repository, Some(split_sizes));
15201527

1521-
rewrite_manifests(&new_repo, "main", "rewrite_manifests with split-size=4", None)
1522-
.await?;
1528+
let snap = rewrite_manifests(
1529+
&new_repo,
1530+
"main",
1531+
"rewrite_manifests with split-size=4",
1532+
None,
1533+
)
1534+
.await?;
15231535
total_manifests += 3;
15241536
assert_manifest_count(&storage, total_manifests).await;
15251537
validate_data().await;
1538+
assert!(
1539+
repository
1540+
.lookup_snapshot(&snap)
1541+
.await?
1542+
.metadata
1543+
.contains_key("splitting_config")
1544+
);
15261545

15271546
Ok(())
15281547
}

icechunk/src/session.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,7 @@ impl Session {
972972

973973
let splitting_config_serialized =
974974
serde_json::to_value(self.config.manifest().splitting())?;
975-
let mut properties =
976-
properties.unwrap_or_else(|| BTreeMap::<String, Value>::new());
975+
let mut properties = properties.unwrap_or_else(BTreeMap::<String, Value>::new);
977976
properties.insert("splitting_config".to_string(), splitting_config_serialized);
978977
self._commit(message, Some(properties), true).await
979978
}

0 commit comments

Comments
 (0)