laskoviymishka opened a new issue, #833: URL: https://github.com/apache/iceberg-go/issues/833
### Feature Request / Improvement Parent: #829 (v2 spec completion) Sort orders are fully modeled in metadata — `SortOrder`, `SortField`, direction, null order, transforms — and tracked through schema/spec evolution. However the write path never consults the table's sort order. Data is written in arrival order regardless of the `default-sort-order` setting. ### Current state - `SortOrder` / `SortField` types with JSON marshaling, validation, compatibility checks — `table/sorting.go` - `MetadataBuilder.AddSortOrder`, `SetDefaultSortOrder` — fully wired - `WriteTask.SortOrderID` field exists (`table/writer.go`) but is never populated or used - `writerFactory` in `table/rolling_data_writer.go` has access to metadata but doesn't read the sort order - Arrow Go compute has no sort kernel, but `compute.Take` exists (used for positional deletes in #825, #762) — can reorder batches by permutation index ### Context Sort order enforcement improves query performance for engines that can exploit sorted data (range scans, merge joins). It's also needed for sort-aware compaction (#832) — when compacting, the output should respect the table's sort order. -- 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]
