feat: Add some logging when changing sort key in tests

pull/24376/head
Carol (Nichols || Goulding) 2022-04-08 15:47:45 -04:00
parent 628d54836a
commit d75b161f44
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
1 changed files with 10 additions and 2 deletions

View File

@ -566,15 +566,23 @@ async fn update_catalog_sort_key_if_needed(
let new_sort_key: Vec<_> = sort_key_string.split(',').collect();
let (_metadata, update) = adjust_sort_key_columns(&catalog_sort_key, &new_sort_key);
if let Some(new_sort_key) = update {
let new_columns = new_sort_key.to_columns();
dbg!(
"Updating sort key from {:?} to {:?}",
catalog_sort_key.to_columns(),
&new_columns,
);
partitions_catalog
.update_sort_key(partition_id, &new_sort_key.to_columns())
.update_sort_key(partition_id, &new_columns)
.await
.unwrap();
}
}
None => {
let new_columns = sort_key.to_columns();
dbg!("Updating sort key from None to {:?}", &new_columns,);
partitions_catalog
.update_sort_key(partition_id, &sort_key.to_columns())
.update_sort_key(partition_id, &new_columns)
.await
.unwrap();
}