leaves12138 commented on code in PR #6692:
URL: https://github.com/apache/paimon/pull/6692#discussion_r2570855497
##########
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:
It's too big, you can try:
Roaring64NavigableMap roaring64NavigableMap = new
Roaring64NavigableMap();
for (long i = 0; i < 1000000; i++) {
roaring64NavigableMap.add(i);
}
System.out.println(roaring64NavigableMap.serializedSizeInBytes());
It returns 131217, 131KB.
Range just two longs with class head.
--
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]