ArnavBalyan commented on code in PR #6178:
URL: https://github.com/apache/paimon/pull/6178#discussion_r2315572061
##########
paimon-common/src/main/java/org/apache/paimon/fileindex/rangebitmap/RangeBitmapFileIndex.java:
##########
@@ -156,20 +156,24 @@ public FileIndexResult visitGreaterOrEqual(FieldRef
fieldRef, Object literal) {
@Override
public FileIndexResult visitTopN(TopN topN, FileIndexResult result) {
List<SortValue> orders = topN.orders();
- if (orders.size() != 1) {
- return FileIndexResult.REMAIN;
- }
+
+ // If multiple columns, use first column with allowDuplicates=true
+ boolean useFirstColumn = orders.size() > 1;
+ SortValue sort = orders.get(0); // Always use first column
+ boolean allowDuplicates = useFirstColumn;
Review Comment:
updated
##########
paimon-common/src/test/java/org/apache/paimon/fileindex/rangebitmap/RangeBitmapFileIndexTest.java:
##########
@@ -34,13 +36,7 @@
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Objects;
-import java.util.Random;
-import java.util.Set;
+import java.util.*;
Review Comment:
updated
--
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]