Repository navigation
feat(manifest): Extent manifest to support iceberg v3 format - #560
Merged
Merged
Conversation
Signed-off-by: dttung2905 <[email protected]>
Signed-off-by: dttung2905 <[email protected]>
dttung2905
marked this pull request as ready for review
September 16, 2025 18:49
zeroshade
reviewed
Sep 16, 2025
| func (v3writerImpl) content() ManifestContent { return ManifestContentData } | ||
| func (v3writerImpl) prepareEntry(entry *manifestEntry, snapshotID int64) (ManifestEntry, error) { | ||
| // TODO : implement this for v3 | ||
| return entry, nil |
Member
There was a problem hiding this comment.
return a not-implemented-error for now
zeroshade
requested changes
Sep 16, 2025
|
|
||
| func NewManifestListWriterV3() (*ManifestListWriter, error) { | ||
| // TODO: Implement v3 writer | ||
| return nil, errors.New("not implemented manifest list writer for v3 yet") |
Member
There was a problem hiding this comment.
use fmt.Errorf("%w: manifest list writer for v3", iceberg.ErrNotImplemented)
Comment on lines
+1362
to
+1379
| // Ref: https://github.com/apache/iceberg/blob/ea2071568dc66148b483a82eefedcd2992b435f7/core/src/main/java/org/apache/iceberg/V3Metadata.java#L98-L122 | ||
| if wrapped.SeqNumber == -1 { | ||
| if m.commitSnapshotID != wrapped.AddedSnapshotID { | ||
| return fmt.Errorf("found unassigned sequence number for a manifest from snapshot %d != %d", | ||
| m.commitSnapshotID, wrapped.AddedSnapshotID) | ||
| } | ||
| wrapped.SeqNumber = m.sequenceNumber | ||
| } | ||
|
|
||
| if wrapped.MinSeqNumber == -1 { | ||
| if m.commitSnapshotID != wrapped.AddedSnapshotID { | ||
| return fmt.Errorf("found unassigned sequence number for a manifest from snapshot: %d", wrapped.AddedSnapshotID) | ||
| } | ||
| wrapped.MinSeqNumber = m.sequenceNumber | ||
| } | ||
| if err := m.writer.Encode(wrapped); err != nil { | ||
| return err | ||
| } |
Member
There was a problem hiding this comment.
since this logic is identical between v2 and v3, is there any way we can consolidate the logic and reduce the duplication?
Contributor
Author
There was a problem hiding this comment.
Initially, I want it to be separated from version 2 to avoid changing the existing logic as much as possible. But yes you are right, the only different is from the first row id for lineage tracking. I have combined both logic
Comment on lines
+1407
to
+1408
| // TODO | ||
| writer, err = NewManifestListWriterV3() |
Member
There was a problem hiding this comment.
return a not-implemented-error for now
Signed-off-by: dttung2905 <[email protected]>
zeroshade
approved these changes
Sep 17, 2025
zeroshade
approved these changes
Sep 17, 2025
48 of 58 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi team,
This is the first of the many PR to support for Iceberg v3. In this PR, I try to outline some structural changes to the interface without making it too big and hard to review. More PR to come as we implement manifest list writer for v3