Repository navigation
Core: Implement table refs in TableMetadataParser - #4260
Conversation
fc51741 to
0881f61
Compare
nastra
left a comment
There was a problem hiding this comment.
changes LGTM once CI passes
| currentSnapshotId, main != null ? main.snapshotId() : null); | ||
| } else { | ||
| Preconditions.checkArgument(main == null, | ||
| "Current snapshot is not set, but main branch exists: %s", main); |
There was a problem hiding this comment.
nit: should this mention ...snapshot ID is not set... to be consistent with the error message above?
| SnapshotRef main = inputRefs.get(SnapshotRef.MAIN_BRANCH); | ||
| if (currentSnapshotId != -1) { | ||
| Preconditions.checkArgument(main == null || currentSnapshotId == main.snapshotId(), | ||
| "Current snapshot ID does not match main branch (%s != %s)", |
There was a problem hiding this comment.
nit: I wonder if the message would be slightly clearer like this: Current snapshot ID '%s' does not match the snapshot ID '%s' of the main branch
There was a problem hiding this comment.
I strongly prefer keeping the error message itself readable and adding context after. While it is more clear which ID is which in your version, I think it makes the actual problem harder to read because there are longs embedded in the text.
kbendick
left a comment
There was a problem hiding this comment.
+1. This looks good to me once tests are passing.
|
Thanks for the reviews, everyone! |
This updates TableMetadataParser to read and write the refs map.