tanmayrauth commented on PR #1120: URL: https://github.com/apache/iceberg-go/pull/1120#issuecomment-4545025270
- Dropped batch.Release() and enriched.Release() from both !yield branches in buildUnifiedIterator; added a doc comment naming the contract that the releasing wrapper in WriteRecords owns the release on both success and abort paths. - New white-box test TestPositionDeltaWriter_BuildUnifiedIterator_AbortNoDoubleRelease uses CheckedAllocator.AssertSize(t, 0) and exercises the abort branch on the reinsert path, the insert path, and the phase boundary as subtests. - Three-index slices on both Fields() and Columns(). The Columns() one is the real risk — Arrow's Record.Columns() returns the internal arrs slice directly; Fields() happens to copy in the current Arrow version but the defensive slice is forward-compatible. - Appended _row_id field now carries ArrowParquetFieldIDKey → strconv.Itoa(iceberg.RowIDFieldID) so the per-batch and static schemas agree. - New TestPositionDeltaWriter_AppendNullRowIDColumn_NoSourceAliasing builds a source batch with cap > len, asserts the source schema/columns are untouched, and asserts the field-id metadata is present. - Bumped preserved IDs in the lineage test to 1 << 40 and (1<<40)+1 and switched to direct Equal assertions, so a hypothetical bug where the writer drops _row_id and the reader synthesizes from first_row_id now fails instead of coinciding. - NewPositionDeltaWriter(tbl, opts ...WriteRecordOption) threads caller-supplied options (target file size, worker count, clustered write) through to WriteRecords. Writer-owned WithPreserveRowLineage and WithWriteUUID are appended last so they take precedence on conflict; documented on the constructor. - Added a "Memory model" paragraph on the type doc making the accumulate-then-flush behavior explicit and noting the streaming variant is deferred to the position-delete writer PR. - Full table test suite passes and go vet is clean. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
