findinpath opened a new issue #3891:
URL: https://github.com/apache/iceberg/issues/3891


   Currently the `SnapshotUtil` is going over all the history entries of a 
table (with O(n) complexity).
   ```
       Long snapshotId = null;
       for (HistoryEntry logEntry : table.history()) {
         if (logEntry.timestampMillis() <= timestampMillis) {
           snapshotId = logEntry.snapshotId();
         }
       }
   ```
   
   In case that the `org.apache.iceberg.Table#history` would be guaranteed to 
be ordered, a binary search algorithm could be used instead (O(log n) 
complexity).


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