godfreyhe commented on a change in pull request #14663: URL: https://github.com/apache/flink/pull/14663#discussion_r559352791
########## File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/utils/LookupJoinUtil.java ########## @@ -58,4 +71,50 @@ public FieldRefLookupKey(int index) { private LookupJoinUtil() { // no instantiation } + + /** Gets LookupFunction from temporal table according to the given lookup keys. */ + public static UserDefinedFunction getLookupFunction( + RelOptTable temporalTable, Collection<Integer> lookupKeys) { + + List<Integer> lookupKeyIndicesInOrder = new ArrayList<>(lookupKeys); + lookupKeyIndicesInOrder.sort(Integer::compareTo); Review comment: nit: `CommonExecLookupJoin#getOrderedLookupKeys` can be moved into `LookupJoinUtil` and then this method can reuse it. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org