lxy-9602 commented on code in PR #6692:
URL: https://github.com/apache/paimon/pull/6692#discussion_r2571092236
##########
paimon-common/src/main/java/org/apache/paimon/globalindex/GlobalIndexResult.java:
##########
@@ -18,54 +18,108 @@
package org.apache.paimon.globalindex;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import java.util.Set;
+import org.apache.paimon.utils.Range;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
/**
- * Global index result represents row ids.
+ * Global index result represents row ids as a list of ranges.
*
- * <p>TODO introduce ranges interface
+ * <p>Invariant: The list returned by {@link #results()} must be sorted by
range start position and
+ * contain no overlapping ranges.
*/
-public interface GlobalIndexResult extends Iterable<Long> {
+public interface GlobalIndexResult {
Review Comment:
I’m not very familiar with the performance of the Java version of
RoaringBitmap, but in my local C++ tests, constructing a bitmap with 1,000,000
consecutive row IDs using the addRange() API results in a serialized size of
only about 200 bytes, and range-based intersection operations typically
complete in the microsecond (μs) range.
--
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]