weiqingy commented on code in PR #28827:
URL: https://github.com/apache/flink/pull/28827#discussion_r3733713600


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalIntervalJoinRule.java:
##########
@@ -170,6 +170,12 @@ private static EarlyFire extractEarlyFire(List<RelHint> 
hints, boolean isEventTi
         }
 
         Configuration conf = Configuration.fromMap(earlyFireHint.kvOptions);
+        // target scopes the hint to one operator kind: this rule applies it 
only when it targets
+        // the interval join, and leaves a hint aimed at any other operator 
kind untouched.
+        String target = conf.get(EarlyFireJoinHintOptions.TARGET);
+        if (target != null && 
!EarlyFireJoinHintOptions.INTERVAL_JOIN.equals(target)) {

Review Comment:
   Thanks for the review. Good catch. I had to add one more piece to make it 
work.
   
   `target` had no default, so when someone leaves it out, `conf.get` returns 
null and `!INTERVAL_JOIN.equals(null)` is true. The hint would get thrown away 
for the common `EARLY_FIRE('delay'='5s')` form. Six tests catch it, and in two 
of them the validation errors stop firing, so a bad hint would plan fine 
instead of failing.
   
   So I gave `target` a default of `interval_join`. It is never null now, your 
line works as written, and the checker in `FlinkHintStrategies` drops its null 
check too. Pushed in 559ab5d34b0.
   



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