lincoln-lil commented on code in PR #27020:
URL: https://github.com/apache/flink/pull/27020#discussion_r2367093307


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/utils/DeltaJoinUtil.java:
##########
@@ -276,15 +276,20 @@ private static boolean isTableScanSupported(TableScan 
tableScan, int[] lookupKey
         // the source must have at least one index, and the join key contains 
one index
         Set<Integer> lookupKeysSet = 
Arrays.stream(lookupKeys).boxed().collect(Collectors.toSet());
 
+        boolean lookupKeyContainsOneIndex = false;
         for (int[] idxsOfIndex : idxsOfAllIndexes) {

Review Comment:
   Can we simplify this for-loop into simple call, e.g., 
   ```
   boolean lookupKeyContainsOneIndex = Arrays.stream(idxsOfAllIndexes)
           .peek(idxs -> Preconditions.checkState(idxs.length > 0))
           .anyMatch(idxs -> 
Arrays.stream(idxs).allMatch(lookupKeysSet::contains));
   ```
   ?



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