Skip to content

[FLINK-34335][table] Print query hints in RexSubQuery explain output#28681

Open
Au-Miner wants to merge 2 commits into
apache:masterfrom
Au-Miner:fix/34335
Open

[FLINK-34335][table] Print query hints in RexSubQuery explain output#28681
Au-Miner wants to merge 2 commits into
apache:masterfrom
Au-Miner:fix/34335

Conversation

@Au-Miner

@Au-Miner Au-Miner commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Fix query hints inside RexSubQuery so they are visible in explain output, including sibling subqueries with different join hints.

Brief change log

  • Update RelTreeWriterImpl#item to detect RexSubQuery expressions and render their inner rel plans with hint-aware output.
  • Share hint rendering through RelTreeWriterImpl#addHintItems, so main explain and subquery explain use the same query hint and query block alias rules.

Verifying this change

Added JoinHintTestBase#testJoinHintWithDifferentHintsInSiblingSubQueries and updated the join hint XML plans for broadcast, shuffle hash, nest loop, and shuffle merge hints to assert subquery hints are printed correctly.

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? not applicable

@flinkbot

flinkbot commented Jul 8, 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

@featzhang featzhang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few inline comments, no blocking issues from my side

@featzhang featzhang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few inline comments, no blocking issues from my side

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Jul 8, 2026
@Au-Miner

Copy link
Copy Markdown
Contributor Author

Hi @featzhang, thanks for the review. If you have any other questions, please feel free to contact me

@Au-Miner Au-Miner requested a review from featzhang July 10, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants