chore: Add tags to checkpoint - #3291
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3291 +/- ##
=======================================
Coverage 90.28% 90.28%
=======================================
Files 251 251
Lines 88575 88572 -3
Branches 88575 88572 -3
=======================================
- Hits 79973 79971 -2
+ Misses 5718 5717 -1
Partials 2884 2884 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Benchmark results: ✅ PassSummary: 🚀 0 · ✅ 13 · ☑️ 2 · 🚧 0 · ❌ 0 Per-benchmark results (15 rows)
Legend: 🚀 ≥1.15x faster · ✅ faster or unchanged · ☑️ ≤1.03x slower · 🚧 1.03x-1.15x slower · ❌ ≥1.15x slower |
rliao147
left a comment
There was a problem hiding this comment.
Thanks for the contribution, I can stamp after the test changes are done. Also, please check merge conflicts.
| @@ -111,17 +111,16 @@ use crate::action_reconciliation::{ | |||
| ActionReconciliationIterator, ActionReconciliationIteratorState, RetentionCalculator, | |||
There was a problem hiding this comment.
can you please add these validations to test_create_checkpoint_metadata_batch ?
Now, we're writing tags to disk when Kernel writes a V2 checkpoint file, but we're lacking some regression tests to validate the tags are correct.
let cm = record_batch.column_by_name("checkpointMetadata").unwrap()
.as_any().downcast_ref::<StructArray>().unwrap();
let tags = cm.column_by_name("tags").expect("checkpointMetadata must carry a tags field");
assert!(tags.as_any().downcast_ref::<MapArray>().is_some(), "tags must be a map");
assert!(tags.is_null(0), "tags should be written null");
let version = cm.column_by_name("version").unwrap()
.as_any().downcast_ref::<Int64Array>().unwrap();
assert_eq!(version.value(0), snapshot.version() as i64);
What changes are proposed in this pull request?
By adding tags to checkpoint, we can leverage
CheckpointMetadata::to_schema(), simplifying the code.How was this change tested?
Existing tests