gimgit commented on PR #17504:
URL: https://github.com/apache/iceberg/pull/17504#issuecomment-5311297414

   @pvary thanks. I implemented the selection you suggested instead of leaving 
it for later:
   
   ```sql
   CALL catalog.system.rewrite_data_files(table => 'db.tbl', strategy => 'sort',
     options => map('min-overlap-depth', '4'));
   ```
   
   Files in regions where the overlap depth reaches the threshold are added to 
the rewrite, next to the existing size and delete conditions. The option is 
unset by default, so selection behavior doesn't change unless it is used. 
Planning only reads bounds for the sort column, and only when the option is set.
   
   One limitation: overlap is measured on the table sort order. The `SortOrder` 
argument of `sort(order)` isn't visible to the planner, so custom orders and 
zorder aren't covered yet. I can wire that here or in a follow-up.
   
   @RussellSpitzer would you be able to review, or suggest someone? This builds 
on the sort compaction path from #2609. The problem in one line: selection is 
size-based, so size-healthy files that fully overlap on the sort key are never 
rewritten, and the job reports success. Reproduction in #17489.
   
   cc @manuzhang @gaborkaszab
   


-- 
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]

Reply via email to