Repository navigation
Cherry pick #107437 to 26.6: Fix hive partition validation when compatibility is 26.6 - #111163
Merged
robot-ch-test-poll4 merged 20 commits intoJul 21, 2026
Merged
Conversation
Co-authored-by: Cursor <[email protected]>
…ard'.
With the hive default under compatibility 26.6, implicit {_partition_id} paths
must explicitly request wildcard partitioning in tests that still exercise
the old behaviour.
Co-authored-by: Cursor <[email protected]>
Under compatibility 26.5 the default partition strategy remains wildcard, so
{_partition_id} paths must still be accepted.
Co-authored-by: Cursor <[email protected]>
Fast test builds omit the S3 storage engine, so the test fails with UNKNOWN_STORAGE before reaching the intended BAD_ARGUMENTS check. Co-authored-by: Cursor <[email protected]>
…hive default.
Legacy S3/Azure integration tests that use {_partition_id} without an explicit
partition_strategy now opt into partition_strategy='wildcard', matching the
stateless test updates and fixing CI failures on PR #107437.
Co-authored-by: Cursor <[email protected]>
…ault. Use positional wildcard partition strategy in Azure tests (ENGINE and table function) and add upstream 04000 prefetch test with explicit wildcard. Co-authored-by: Cursor <[email protected]>
…on-id-compatibility-106465 # Conflicts: # tests/queries/0_stateless/04000_s3_table_function_small_file_prefetch.sql
…opt doc partitioned-write examples into wildcard strategy, pin 04337 wildcard case to compatibility 26.6 Co-Authored-By: Claude Fable 5 <[email protected]>
…ference The docs/reference .mdx copies of the partitioned-write examples still omitted `partition_strategy='wildcard'` and would fail under the 26.6 `hive` default. Co-Authored-By: Claude Fable 5 <[email protected]>
…card partition strategy
`gcs` shares `StorageS3Configuration`, so its `{_partition_id}` partitioned-write
examples fail under the 26.6 `hive` default like the `s3` ones already fixed; the
in-source `S3` engine documentation in `registerStorageObjectStorage.cpp` is the
source the engine docs are generated from and would reintroduce the stale example.
Co-Authored-By: Claude Fable 5 <[email protected]>
… ATTACH
The 26.6 hive default was re-derived on every table load, so a pre-26.6 table
whose path carries `{_partition_id}` (implicit wildcard) threw `BAD_ARGUMENTS`
from `initPartitionStrategy` during metadata load — aborting server startup
(stress test: `Cannot start clickhouse-server` on the test's own leftover
tables) and breaking upgrades (Upgrade check: `test_02245_s3_nested_orc1`).
Such a table can only ever have been wildcard (`hive` forbids the placeholder),
so ATTACH / startup / RESTORE / replicated-DDL replay now load it as wildcard;
only a user-issued `CREATE` applies `file_like_engine_default_partition_strategy`.
Table functions keep strict validation (flag defaults to true).
Adds a DETACH/ATTACH regression to 04337 (same code path as startup) and drops
the test's tables so stress-test restarts don't trip over leftovers.
CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=107437&sha=1474abd8cde4f9173afdfb74bbbca649a2e1e478&name_0=PR
Co-Authored-By: Claude Fable 5 <[email protected]>
`SET compatibility` does not override the explicitly-set `file_like_engine_default_partition_strategy = 'wildcard'` from the earlier case, so the DETACH/ATTACH block was still running under the wildcard default and would pass even without the load-path fix. Pin the default to `hive` explicitly before the ATTACH. Co-Authored-By: Claude Fable 5 <[email protected]>
The `ENGINE = URL` listable-glob branch constructs `StorageObjectStorage`
directly, bypassing `createStorageObjectStorage`, so it missed the flag and an
old URL table with a `{_partition_id}` path would still re-derive `hive` on
ATTACH/startup. Same contract, same one-liner.
Co-Authored-By: Claude Fable 5 <[email protected]>
The non-CREATE branch only forced wildcard for `{_partition_id}` paths and
still consulted the mutable default otherwise, so the mirror case broke: an
implicit-hive table (created under the 26.6 default, plain root path) loaded
under a wildcard default (downgrade, `compatibility = '26.5'` session) was
reclassified as wildcard and threw `BAD_ARGUMENTS` for the missing placeholder.
On load the strategy is now fully path-determined: `{_partition_id}` present
means wildcard, absent means hive; the default only applies to CREATE.
Adds the mirror-case DETACH/ATTACH regression to 04337.
Co-Authored-By: Claude Fable 5 <[email protected]>
…licitly Master's test rewrite (e405e66, 2026-07-12) switched the object-writing in test_s3_glob_scheherazade and test_s3_glob_many_objects_under_selection to bare `{_partition_id}` partitioned inserts, relying on the unconditional promote-to-wildcard this PR narrows to wildcard-default only. Under the 26.6 `hive` default the writes then throw `BAD_ARGUMENTS` ("Partition strategy hive can not be used with a '_partition_id' wildcard in the path") - caught by the private sync CI; the public run predates the rewrite. Same adaptation as test_partition_by already carries: explicit partition_strategy='wildcard'.
…gcs synopses Review follow-up: the azureBlobStorage partitioned-write example uses the positional partition_strategy slot and the gcs examples use the named form, but neither page advertised the parameter in its Syntax block or arguments table. Add the slot to both azureBlobStorage syntax forms and to gcs, plus argument-table rows, mirrored into docs/reference.
…n-id-compatibility-106465 Fix hive partition validation when compatibility is 26.6
|
Lefteris Gilmaz seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
…ypick/26.6/107437 # Conflicts: # docs/reference/engines/table-engines/integrations/s3.mdx # docs/reference/functions/table-functions/azureBlobStorage.mdx # docs/reference/functions/table-functions/gcs.mdx # docs/reference/functions/table-functions/s3.mdx # src/Storages/ObjectStorage/StorageObjectStorageConfiguration.h # src/Storages/ObjectStorage/registerStorageObjectStorage.cpp # src/Storages/StorageURL.cpp # tests/integration/test_storage_s3/test.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original pull-request #107437
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-picklocally.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.
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:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job