You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "SAY-5 (via GitHub)" <gi...@apache.org> on 2026/04/22 06:51:03 UTC
[PR] fix(table): ReplaceDataFiles should emit OpReplace instead of OpOverwrite [iceberg-go]
SAY-5 opened a new pull request, #930:
URL: https://github.com/apache/iceberg-go/pull/930
Closes #841.
\`ReplaceDataFiles\`, \`ReplaceDataFilesWithDataFiles\` and \`ReplaceFiles\` all produced snapshots with \`Operation = \"overwrite\"\` because of a leftover TODO in \`table/transaction.go\` noting that no validation enforces row-content equivalence. The three APIs are named \`Replace*\` for a reason: callers use them for compaction and delete-file GC where the row-level data is unchanged and only reorganized into different physical files. Per the Iceberg spec that's a REPLACE operation; emitting \`OVERWRITE\` masks those snapshots from downstream tooling that treats overwrite as a data-content change (incremental scans, table-maintenance logic, etc.).
## Change
- \`table/transaction.go:427\` — \`ReplaceDataFiles\` now passes \`OpReplace\` to \`updateSnapshot\`.
- \`table/transaction.go:736\` — \`ReplaceDataFilesWithDataFiles\` does the same.
- \`table/transaction.go:849\` — \`ReplaceFiles\` does the same (this path also covers removing pre-existing delete files as part of a compaction rewrite).
- \`ReplaceDataFiles\` doc comment rewritten to state the caller-held invariant (row content must be equivalent) explicitly instead of punting with a TODO.
- \`table/replace_files_test.go\` — single assertion flipped from \`OpOverwrite\` to \`OpReplace\` in \`TestReplaceFiles_DataAndDeleteFiles\` to match the new behaviour.
## Verification
\`\`\`
$ go build ./...
(clean)
$ go test -count=1 -run 'TestReplace|TestCompact' -timeout 180s ./table/...
ok github.com/apache/iceberg-go/table 5.554s
ok github.com/apache/iceberg-go/table/compaction 6.270s
ok github.com/apache/iceberg-go/table/internal 3.488s
ok github.com/apache/iceberg-go/table/substrait 2.015s
\`\`\`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(table): ReplaceDataFiles should emit OpReplace instead of OpOverwrite [iceberg-go]
Posted by "SAY-5 (via GitHub)" <gi...@apache.org>.
SAY-5 commented on PR #930:
URL: https://github.com/apache/iceberg-go/pull/930#issuecomment-4378470452
Yes — closing in favor of #867. Thanks @laskoviymishka.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(table): ReplaceDataFiles should emit OpReplace instead of OpOverwrite [iceberg-go]
Posted by "SAY-5 (via GitHub)" <gi...@apache.org>.
SAY-5 closed pull request #930: fix(table): ReplaceDataFiles should emit OpReplace instead of OpOverwrite
URL: https://github.com/apache/iceberg-go/pull/930
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(table): ReplaceDataFiles should emit OpReplace instead of OpOverwrite [iceberg-go]
Posted by "SAY-5 (via GitHub)" <gi...@apache.org>.
SAY-5 commented on PR #930:
URL: https://github.com/apache/iceberg-go/pull/930#issuecomment-4294307326
Pushed a follow-up commit that flips the two remaining `Operation: OpOverwrite` assertions in `table/table_test.go` (`TestReplaceDataFiles` and `TestReplaceDataFilesWithDataFiles`) to `OpReplace`. All table tests green locally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(table): ReplaceDataFiles should emit OpReplace instead of OpOverwrite [iceberg-go]
Posted by "laskoviymishka (via GitHub)" <gi...@apache.org>.
laskoviymishka commented on PR #930:
URL: https://github.com/apache/iceberg-go/pull/930#issuecomment-4294870176
Is this a duplicate of #867?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org