Skip to content

Cherry pick #130531 to 26.10: Revert "Make a table read by a scalar subquery in a CONSTRAINT a loading dependency" - #131434

Merged
PedroTadim merged 8 commits into
backport/26.10/130531from
cherrypick/26.10/130531
Nov 16, 2026
Merged

PedroTadim merged 8 commits into
backport/26.10/130531from
cherrypick/26.10/130531

Conversation

@robot-ch-test-poll4

Copy link
Copy Markdown
Contributor

Original pull-request #130531

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 8 commits November 10, 2026 14:04
…y-loading-dependency"

This reverts commit 659cc1c, reversing
changes made to f75df10.

Conflicts resolved by removing only what #114923 added: the narrow
qualification pass in AddDefaultDatabaseVisitor.h is removed together with
the parts #114908 later added inside it; InterpreterCreateQuery.cpp keeps
the expansion bound of #122362 on the neighbouring call; the string overload
of qualifyDictionaryNameWithDatabase in ExternalDictionariesLoader is kept,
because the dictionary usage record of #121567 is built on it.
04908_constraint_subquery_loading_dependency.sh (edited by #124408) is
deleted with the rest of the test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the revert, the only caller of `addWithAliases` passes
`only_recursive_with_hides_table = true`, so `collectWithExpressionAliases`
is never called and `with_expression_aliases` is never written:
`isExpressionAlias(name)` equals `expression_aliases.contains(name)` on every
remaining path. Remove the parameter, the member and both helpers (added by
#114908 for the removed pass); the full traversal behaves as before. The
second sentence of the comment on the string overload of
`qualifyDictionaryNameWithDatabase` named the removed metadata-load caller.

05233_udf_expansion_with_alias_scope (#114908) and
05317_udf_dictget_alias_column_lightweight_delete (#123563, issue #123489)
test the qualification of the names a SQL UDF brings into a CREATE, which
the revert removes; both fail on the revert commit and are deleted.

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

The case relied on `CREATE` adding the current database to the `joinGet` table name, which this revert
removes. The unqualified name was then resolved against the test database at `ATTACH`, so the case no
longer covered a dropped database and the server logged `Replacing outdated dependencies` to stderr.

Related: ClickHouse/clickhouse-private#86905

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The revert drops `#include <Databases/DatabaseOnDisk.h>` from TablesLoader.cpp,
but `removeUnresolvableDependencies` now does a `dynamic_cast` to
`DatabaseWithOwnTablesBase` (12cee6e, merged on 2026-11-09), which got its
declaration only through that include. The merge queue build of this PR failed
with `unknown type name 'DatabaseWithOwnTablesBase'`. Include the header that
declares it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Revert "Make a table read by a scalar subquery in a CONSTRAINT a loading dependency"
@robot-ch-test-poll4 robot-ch-test-poll4 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 Nov 13, 2026
@groeneai

Copy link
Copy Markdown
Collaborator

I resolved the conflict on my fork. The branch is a merge of backport/26.10/130531 into cherrypick/26.10/130531, so it fast-forwards the cherry-pick branch:

git fetch https://github.com/groeneai/ClickHouse groeneai/resolve-26.10-cherrypick-130531 && git push origin FETCH_HEAD:cherrypick/26.10/130531

@PedroTadim

Copy link
Copy Markdown
Member

Not according to the policy to backport

@PedroTadim PedroTadim closed this Nov 16, 2026
@PedroTadim PedroTadim reopened this Nov 16, 2026
@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Dear @PedroTadim, @groeneai, this PR is opened while #130531 was marked as backported. The pr-backports-created is removed, so the original PR can be processed again.

If the cherry-pick is not needed anymore, then just close this PR.

@PedroTadim
PedroTadim merged commit 46d1be9 into backport/26.10/130531 Nov 16, 2026
185 of 187 checks passed
@PedroTadim
PedroTadim deleted the cherrypick/26.10/130531 branch November 16, 2026 12:09
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.

4 participants