Skip to content

Commit c5a4c94

Browse files
authored
Merge pull request JanKaul#236 from JanKaul/fix-upgrade-format-update
don't return from applying table updates when upgrade is encountered
2 parents 0db219a + b9720f7 commit c5a4c94

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

iceberg-rust/src/catalog/commit.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,9 @@ pub fn apply_table_updates(
420420
for update in updates {
421421
match update {
422422
TableUpdate::UpgradeFormatVersion { format_version } => {
423-
if i32::from(metadata.format_version) == format_version {
424-
return Ok(());
423+
if i32::from(metadata.format_version) != format_version {
424+
unimplemented!("Table format upgrade");
425425
}
426-
unimplemented!("Table format upgrade");
427426
}
428427
TableUpdate::AssignUuid { uuid } => {
429428
metadata.table_uuid = Uuid::parse_str(&uuid)?;
@@ -520,10 +519,9 @@ pub fn apply_view_updates<T: Materialization + 'static>(
520519
for update in updates {
521520
match update {
522521
ViewUpdate::UpgradeFormatVersion { format_version } => {
523-
if i32::from(metadata.format_version.clone()) == format_version {
524-
return Ok(());
522+
if i32::from(metadata.format_version.clone()) != format_version {
523+
unimplemented!("Upgrade of format version");
525524
}
526-
unimplemented!("Upgrade of format version");
527525
}
528526
ViewUpdate::AssignUuid { uuid } => {
529527
metadata.view_uuid = Uuid::parse_str(&uuid)?;

0 commit comments

Comments
 (0)