Skip to content

[release-24.0] Preserve query hints in field/impossible queries (#20366)#20399

Open
vitess-bot[bot] wants to merge 2 commits into
release-24.0from
backport-20366-to-release-24.0
Open

[release-24.0] Preserve query hints in field/impossible queries (#20366)#20399
vitess-bot[bot] wants to merge 2 commits into
release-24.0from
backport-20366-to-release-24.0

Conversation

@vitess-bot

@vitess-bot vitess-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description

This is a backport of #20366

Copilot AI review requested due to automatic review settings June 25, 2026 12:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vitess-bot

vitess-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Hello @arthurschreiber, there are conflicts in this backport.

Please address them in order to merge this Pull Request. You can execute the snippet below to reset your branch and resolve the conflict manually.

Make sure you replace origin by the name of the vitessio/vitess remote

git fetch --all
gh pr checkout 20399
git reset --hard origin/release-24.0
git cherry-pick -m 1 72a42a5c57c48ae06548d5014f181ede6b148d4c

Apply the query-hint preservation change onto release-24.0's
FormatImpossibleQuery, which does not carry the 'from dual' refactor.

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
@arthurschreiber arthurschreiber removed Skip CI Skip CI actions from running Merge Conflict labels Jun 25, 2026
@arthurschreiber

Copy link
Copy Markdown
Member

Resolved the committed merge conflict in go/vt/sqlparser/impossible_query.go.

The conflict arose because release-24.0's FormatImpossibleQuery does not carry the from dual refactor that exists on main. The upstream PR (#20366) only intends to preserve query hints in the field/impossible query, so I applied just that change — adding node.Comments to the select output — on top of release-24.0's existing structure, leaving the from handling untouched.

Unit tests pass: TestFormatImpossibleQuery (sqlparser) and the full planbuilder testdata suite.

@arthurschreiber arthurschreiber marked this pull request as ready for review June 25, 2026 19:09
Copilot AI review requested due to automatic review settings June 25, 2026 19:09
@arthurschreiber arthurschreiber enabled auto-merge (squash) June 25, 2026 19:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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