lincoln-lil commented on code in PR #20705: URL: https://github.com/apache/flink/pull/20705#discussion_r957413254
########## flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/optimize/JoinHintResolver.java: ########## @@ -99,10 +105,14 @@ private RelNode visitBiRel(BiRel biRel) { assert null != lookupTable; if (rightName.isPresent() && matchIdentifier(lookupTable, rightName.get())) { validHints.add(trimInheritPath(hint)); + updateInfoForOptionCheck(hint.hintName, leftName); Review Comment: here should be rightName instead? ########## flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/optimize/JoinHintResolver.java: ########## @@ -172,21 +187,49 @@ && matchIdentifier(option, rightName.get())) { private void validateHints() { Set<RelHint> invalidHints = new HashSet<>(allHints); invalidHints.removeAll(validHints); + String errorPattern; + + // firstly, check the unknown table (view) names in hints + errorPattern = + "The options of following hints cannot match the name of " + + "input tables or views: %s"; + StringBuilder errorMsgSb = new StringBuilder(); + AtomicBoolean containsInvalidOptions = new AtomicBoolean(false); Review Comment: why AtomicBoolean needed here? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org