Skip to content

Cherry pick #122870 to 26.9: Hide a Backup locator named like a COLUMNS matcher in EXPLAIN AST instead of throwing - #123038

Merged
robot-ch-test-poll merged 4 commits into
backport/26.9/122870from
cherrypick/26.9/122870
Oct 2, 2026
Merged

robot-ch-test-poll merged 4 commits into
backport/26.9/122870from
cherrypick/26.9/122870

Conversation

@robot-ch-test-poll3

Copy link
Copy Markdown
Contributor

Original pull-request #122870

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

groeneai and others added 3 commits September 29, 2026 11:16
…T` instead of throwing

With secrets hidden, `EXPLAIN AST` replaces a secret argument with the
masked SQL the secret finder produces for the formatter, parsed back, and
sets the argument's alias on the result. The `Backup` database rule wrote
the locator function name unquoted, so `` `t.COLUMNS`('x') `` was masked as
`t.COLUMNS('[HIDDEN]')`, which parses back as a qualified `COLUMNS`
matcher. A matcher cannot carry an alias, so `EXPLAIN AST` threw
`Can't set alias ... (LOGICAL_ERROR)`.

Print the locator name with `backQuoteIfNeed`, as `ASTFunction` prints a
function name, so the masked text reads back as the same function and
keeps its structure in the dump. In `replaceWithMaskedText`, hide the
argument whole when the parsed text cannot carry an alias, as it already
did for text that does not parse: a bare `COLUMNS` name stays unquoted in
both the formatter and the finder, and the reconstructed `S3(...)` locator
writes a named-collection identifier as written, so its text can also end
in a matcher.

Closes #122810

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…olumns-name

Hide a `Backup` locator named like a `COLUMNS` matcher in `EXPLAIN AST` instead of throwing
@robot-ch-test-poll3 robot-ch-test-poll3 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Sep 30, 2026
@robot-ch-test-poll

Copy link
Copy Markdown
Contributor

The 26.9 branch moved since this cherry-pick was created (now at 3aed218). Re-tried the merge against it and it applies cleanly, so the bot is proceeding without manual resolution.

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

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants