Skip to content

[BP-2.4][FLINK-41446][table-planner] Ignore the EARLY_FIRE join hint in batch mode - #30055

Open
weiqingy wants to merge 1 commit into
apache:release-2.4from
weiqingy:FLINK-41446-bp-2.4
Open

weiqingy wants to merge 1 commit into
apache:release-2.4from
weiqingy:FLINK-41446-bp-2.4

Conversation

@weiqingy

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Backport of #29908 to release-2.4. EARLY_FIRE is a streaming interval-join hint. With this change, batch mode ignores it, as the docs describe, so a batch query with the hint plans exactly as it would without it and keeps adaptive broadcast join. The docs also describe the query-block scope of the hint and how an early-fire join combines with a downstream interval join. Having this in 2.4.0 lets users share one query between streaming and batch jobs from the first release with the hint.

Brief change log

  • Cherry-pick of 73bbab7, applied without conflicts

Verifying this change

This change added tests: plan/hints/batch/EarlyFireJoinHintTest. It, the streaming EarlyFireJoinHintTest, the other batch join hint tests and AdaptiveJoinTest pass on this branch.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? docs

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code 2.1.329 (Claude Opus 5.5)

… mode (apache#29908)

* [FLINK-41446][table-planner] Ignore the EARLY_FIRE join hint in batch mode

EARLY_FIRE is a streaming interval-join hint, but it is registered as a
JoinStrategy, so the batch join rules passed it to checkJoinStrategyValid.
That method has no case for it and threw "Unknown join strategy :
EARLY_FIRE" for every batch query with the hint, inner joins included.

Skip the hint there, as is already done for LOOKUP, so the batch planner
chooses the join as if no hint were given. Also stop
containsJoinStrategyHint from counting it: a join marked as hinted is never
turned into an adaptive join, so the ignored hint would otherwise still
change the batch plan under the default configuration.

* [FLINK-41446][docs] Document the query-block scope of EARLY_FIRE and chained interval joins
@flinkbot

flinkbot commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants