wuchong commented on code in PR #2464:
URL: https://github.com/apache/fluss/pull/2464#discussion_r2742456747
##########
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:
Thank you @luoyuxia , I think we can skip the support of out-of-order lookup
columns, and just support primary key columns in the issue, and support
fail-fast for non-primary-key and non-prefix-key cases.
--
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]