laskoviymishka opened a new pull request, #1040: URL: https://github.com/apache/iceberg-go/pull/1040
Closes #1007. V3 prefers deletion vectors over Parquet position-delete files (Iceberg spec, [apache/iceberg#12048](https://github.com/apache/iceberg/pull/12048)). Java logs a warning when the legacy format is used; iceberg-go currently writes it silently. This adds a single `slog.Warn` at the entry of `positionDeleteRecordsToDataFiles` when the table is v3+, naming the table location so users can identify which table is on the deprecated path. Once the DV writer (#997) lands and flips the default on v3, this warning becomes a backstop for users who explicitly opt back into Parquet position-deletes via `write.delete.format=position`. The warning fires at writer entry, before partition fanout, so a partitioned write logs once total — not once per partition. The test locks that contract with three subtests; the partitioned subtest yields two batches (one per partition path) because `positionDeletePartitionedFanoutWriter.processBatch` reads only the first row's `file_path` and routes the entire batch to one partition, so a single batch with two rows wouldn't actually exercise the fanout. ## Test plan - [x] `TestPositionDeleteV3Warning/v3_unpartitioned_warns_once_with_table_location` — captures default slog output, asserts exactly one `level=WARN` record with the canonical message and the `table_location` attribute. - [x] `TestPositionDeleteV3Warning/v2_does_not_warn` — captures slog output on a v2 write, asserts zero warnings (legacy format is canonical on v2). - [x] `TestPositionDeleteV3Warning/v3_partitioned_write_warns_exactly_once_across_multiple_partitions` — two batches routed to two distinct partitions; asserts exactly one WARN total. Verified the regression lock by temporarily moving the warn into `processBatch` and confirming the test fails with `count==2`. - [x] All existing `TestPositionDelete*` tests still pass. -- 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]
