[FLINK-40167][table] Add EARLY_FIRE join hint surface and option validation - #28353
Conversation
|
Hi @wuchong @xuyangzhong @xccui Could you please help review this PR? Thanks! |
|
@weiqingy This FLIP doesn't have the necessary nr of approved binding votes, so it's not OK to implement this |
|
Thanks @weiqingy @MartijnVisser BWT, @weiqingy
Pls let know what's your opinion. |
|
Hi @MartijnVisser @RocMarshal, thanks for reviewing the PR! I’ve CCed you both on the Discussion, Voting, and Voting Result email thread. I believe we have 3 binding votes, but please let me know if I missed anything. |
@RocMarshal Sounds good. I’ll follow up and look into how to break this PR down into smaller patches. |
I can only see 2 binding votes, I've replied in the thread as well |
raminqaf
left a comment
There was a problem hiding this comment.
As for now, I recommend to switch to a draft PR. After, the FLIP voting settles we can re-open it.
|
Hi @MartijnVisser, @raminqaf, and @RocMarshal, Thanks to all of you for the reviews, suggestions, and clarification. @MartijnVisser: Thanks for clarifying the bylaws. To share my thought process on the tally: when I was gathering the results, Xuyang had become an active committer. I assumed his initial "+1 (non-binding)" vote transitioned to a binding vote along with his new status, which would have brought the total to 3 [1]. I appreciate you pointing this out. I agree with your suggestion to restart the process. Since the thread has been open for over a year, having a new round of discussion is the best way to ensure the design is fully aligned with the current state of the project. I will kick off a new [DISCUSS] thread soon. I also replied in the voting email thread to ensure everyone is on the same page [2]. @raminqaf: I will go ahead and convert this PR to a draft while the new FLIP discussion and voting settle, as you recommended. @RocMarshal: While the FLIP is being re-discussed, I will use the time to look into how to best break this PR down into smaller, more reviewable patches as you suggested. Thanks again for the guidance, everyone! [1] https://lists.apache.org/thread/dcn78blz7cqmmyypw897w0dvf6l58cnt |
fd2d3ac to
3131f4e
Compare
…dation Register the EARLY_FIRE join hint and its typed options (EarlyFireJoinHintOptions: delay, time_mode) with a key-value option checker, and wire the query-hint propagation touchpoints. Exclude EARLY_FIRE from the generic join-hint test coverage and config-docs generation, since it is a key-value hint validated on its own. The hint is recognized and validated here but not yet consumed by any rule; threading it into the interval join follows in a separate change.
3131f4e to
4215571
Compare
|
Thanks everyone for the FLIP-497 discussion and vote 🙏 This kicks off the implementation as a stack of 8 small, independently reviewable PRs (roadmap + sub-tasks FLINK-40167–40174 in the description). This first one, PR-1a, only adds the @xuyangzhong @xccui @RocMarshal — when you have a moment, I'd appreciate your review here. Feedback on the overall split/granularity is welcome too. |
…time-mode Flink option keys use hyphens (e.g. output-mode, fixed-delay); rename the EARLY_FIRE hint's time_mode option key to time-mode to match, and update the affected tests.
…idation tests The runtime uses delay.toMillis(), so a sub-millisecond delay truncates to zero. Make the contract explicit: require at least 1 millisecond in the DELAY description and the checker error message. Add coverage for a sub-millisecond delay, list-style options (only key-value is supported), and case-insensitive hint-name capitalization that preserves the key-value options.
…test class Move the EARLY_FIRE hint surface and option-validation tests out of the Scala IntervalJoinTest into a dedicated Java EarlyFireJoinHintTest (under plan/hints/stream, mirroring StateTtlHintTest), and relocate their plan golden accordingly. IntervalJoinTest keeps only its original tests.
Wrap the assertThatThrownBy chain in testEarlyFireListOptionsRejected to satisfy Spotless.
RocMarshal
left a comment
There was a problem hiding this comment.
LGTM +1
Thanks @weiqingy for the hard work.
Pls let us wait for a few days for more comments.
@snuyanzin Could you help take a look if you had the free time? Thank you.
|
Given the lack of further responses over the past three business days, we will proceed with merging this PR to keep things moving. If there are additional suggestions, please feel free to submit a hotfix or follow-up PR. Thanks! |
This is the first PR of the FLIP-497 implementation, split into a stack of small, independently reviewable PRs under the umbrella issue FLINK-36953. Landing order:
targetoptionWhat is the purpose of the change
Introduces the
EARLY_FIREjoin hint for SQL interval joins: its typed options and key-value validation. The hint is recognized and validated here, but no rule consumes it yet, so it has no planning or runtime effect beyond accepting the new syntax. Threading it into the interval join follows in PR-1b. This keeps the foundational surface layer small and isolated.Brief change log
EarlyFireJoinHintOptions(@PublicEvolving):delay(required),time-mode(optional), and the nestedTimeModeenum.EARLY_FIREinJoinStrategyandFlinkHintStrategieswith a key-value option checker (delaymust be a positive duration;time-modemust berowtime/proctime).CapitalizeQueryHintsShuttle,QueryHintsResolver).EARLY_FIREfrom the generic join-hint test coverage and from config-docs generation.Verifying this change
This change added tests and can be verified as follows:
IntervalJoinTestvalidation cases (requireddelay, positivedelay,time-modeenum, unknown option). Generic join-hint tests stay green withEARLY_FIREexcluded from their coverage.Does this pull request potentially affect one of the following parts:
@Public(Evolving): yes, a new@PublicEvolvingEarlyFireJoinHintOptionsDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Anthropic)