luoyuxia commented on code in PR #2464:
URL: https://github.com/apache/fluss/pull/2464#discussion_r2741391461


##########
fluss-client/src/test/java/org/apache/fluss/client/table/FlussLakeTableITCase.java:
##########
@@ -192,23 +195,26 @@ void testPrimaryKeyTable(boolean isPartitioned, boolean 
isDefaultBucketKey) thro
         Set<InternalRow> allRows =
                 
writtenRows.values().stream().flatMap(List::stream).collect(Collectors.toSet());
 
-        // init lookup columns
-        List<String> lookUpColumns;
-        if (isDefaultBucketKey) {
-            lookUpColumns = Arrays.asList("a", "c", "d");
-        } else {
-            lookUpColumns =
-                    isPartitioned ? Arrays.asList("a", "d") : 
Collections.singletonList("a");
-        }
-        List<InternalRow.FieldGetter> lookUpFieldGetter = new 
ArrayList<>(lookUpColumns.size());
-        for (int columnIndex : pkTableSchema.getColumnIndexes(lookUpColumns)) {
-            lookUpFieldGetter.add(
-                    InternalRow.createFieldGetter(
-                            pkTableSchema.getRowType().getTypeAt(columnIndex), 
columnIndex));
-        }
         // lookup
         try (Table table = conn.getTable(tablePath)) {
-            Lookuper lookuper = 
table.newLookup().lookupBy(lookUpColumns).createLookuper();
+            // init lookup columns
+            List<String> lookUpColumns;
+            Lookuper lookuper;
+            if (isDefaultBucketKey) {
+                lookUpColumns = Arrays.asList("a", "c", "d");
+                lookuper = table.newLookup().createLookuper();
+            } else {
+                lookUpColumns =
+                        isPartitioned ? Arrays.asList("a", "d") : 
Collections.singletonList("a");
+                lookuper = 
table.newLookup().lookupBy(lookUpColumns).createLookuper();

Review Comment:
   Agreed. But I found it will cost some effort to do that since it also 
require to handle the lookUpColumns is with different order which require 
projection and more tests to cover. I create #2521 to track it and will do it 
in #2521 
   



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

Reply via email to