Skip to content

Fix hive partition validation when compatibility is 26.6 - #107437

Merged
tiandiwonder merged 18 commits into
ClickHouse:masterfrom
LefterisXefteris:fix-s3-hive-partition-id-compatibility-106465
Jul 21, 2026
Merged

tiandiwonder merged 18 commits into
ClickHouse:masterfrom
LefterisXefteris:fix-s3-hive-partition-id-compatibility-106465

Conversation

@LefterisXefteris

@LefterisXefteris LefterisXefteris commented Jun 14, 2026 •

Copy link
Copy Markdown

Closes: #106465
Caused by: #86746

After #86746, compatibility = '26.6' makes file_like_engine_default_partition_strategy default to hive. A path containing {_partition_id} was silently accepted instead of raising BAD_ARGUMENTS, while explicitly setting partition_strategy = 'hive' correctly rejected it.

In StorageObjectStorageConfiguration::initialize(), the backwards-compatibility block unconditionally promoted {_partition_id} paths to WILDCARD, bypassing the hive default from initPartitionStrategy(). The fix only performs that promotion when the effective default strategy is WILDCARD.

Legacy stateless tests that still exercise implicit wildcard partitioning ({_partition_id} without an explicit strategy) were updated to opt into partition_strategy = 'wildcard' (or SET file_like_engine_default_partition_strategy = 'wildcard'), including 02302_s3_file_pruning, 04004_s3_schema_hash, 2480_s3_support_wildcard, and related S3 tests.

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fixed a regression where setting compatibility = '26.6' (which implicitly enables hive partition strategy) silently accepted {_partition_id} in S3/object storage table paths instead of raising BAD_ARGUMENTS.

Documentation entry

  • Documentation is not required

Version info

  • Merged into: 26.7.1.1258 (included in 26.7 and later)
  • Backported to: 26.6.2.92

@CLAassistant

CLAassistant commented Jun 14, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tiandiwonder
❌ Lefteris Gilmaz


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.

@clickhouse-gh

clickhouse-gh Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b126b3b]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_asan_ubsan, flaky) ERROR IGNORED

AI Review

Summary

This PR fixes the compatibility = '26.6' regression around implicit object-storage partition strategy selection, and the current code now handles the important create-vs-load split correctly: fresh CREATE still validates against the active default, while ATTACH/startup-style loads recover the strategy from the stored path shape. The regression coverage is materially better now, and I did not find any remaining correctness problems in the object-storage code paths. I only found one small documentation regression in the latest azureBlobStorage follow-up.

Findings
  • 💡 Nits
    • [docs/en/sql-reference/table-functions/azureBlobStorage.md:65] The Arguments table now contains two partition_strategy rows. Collapse them into a single entry so the page does not document the same parameter twice.
Final Verdict
  • Status: ✅ Approve

/// Only promote to WILDCARD when the effective default strategy is WILDCARD (backwards compatibility).
/// When the default is HIVE (e.g. via `SET compatibility = '26.6'`), leave the strategy as NONE
/// so that initPartitionStrategy() sets HIVE and its validation correctly rejects {_partition_id} paths.
if (local_context->getSettingsRef()[Setting::file_like_engine_default_partition_strategy].value

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.

Better to merge the if with the above if, and make comment short.

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.

Resolved in an earlier commit — this is now an if/else-if chain with a one-line comment.

@alexbakharew
alexbakharew requested a review from kssenii June 15, 2026 10:34
@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jun 15, 2026
@kssenii kssenii self-assigned this Jun 15, 2026
Lefteris Gilmaz and others added 2 commits June 15, 2026 13:51
…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]>
@@ -0,0 +1,10 @@
SET compatibility = '26.6';

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.

Let's also add a test with compatibility 26.5?

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.

The 26.5 case was added in 2e24f9a (old_export_compat_265); the follow-up commit also pins the explicit-wildcard case to compatibility = '26.6' so it exercises the 26.6 escape hatch. (commit 4b3b216)

Under compatibility 26.5 the default partition strategy remains wildcard, so
{_partition_id} paths must still be accepted.

Co-authored-by: Cursor <[email protected]>
@kssenii
kssenii enabled auto-merge June 15, 2026 16:05
@@ -0,0 +1,18 @@
-- Tags: no-random-settings

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.

this uses ENGINE = S3, which isn't in the Fast test build, so it needs no-fasttest too — Fast test is already red here with UNKNOWN_STORAGE (56) before it ever reaches the intended BAD_ARGUMENTS (36) check.

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.

Addressed in 6e683d9 — tag added.

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]>
auto-merge was automatically disabled June 18, 2026 17:57

Head branch was pushed to by a user without write access

@LefterisXefteris

Copy link
Copy Markdown
Author

Hello @kssenii, could you let me know if i need to cover more tests or anything?

@kssenii

kssenii commented Jun 23, 2026

Copy link
Copy Markdown
Member

Hi, there are a lot of failed tests, see #107437 (comment)

If you open it - you see https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=107437&sha=6e683d995db4776bb1b79c7ebd7e72406c365b2c&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%206%2F6%29

then press on fail and you will see:

File: test_storage_s3/test.py:246 - in test_partition_by
    run_query(instance, put_query)
File: test_storage_s3/test.py:186 - in run_query
    result = instance.query(query, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File: helpers/cluster.py:5030 - in query
    return self.client.query(
File: helpers/client.py:40 - in wrap
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File: helpers/client.py:80 - in query
    ).get_answer()
      ^^^^^^^^^^^^
File: helpers/client.py:269 - in get_answer
    raise QueryRuntimeException(
E   helpers.client.QueryRuntimeException: Client failed! Return code: 36, stderr: Received exception from server (version 26.6.1):
E   Code: 36. DB::Exception: Received from 172.16.3.9:9000. DB::Exception: Partition strategy hive can not be used with a '_partition_id' wildcard in the path. Stack trace:
E   
E   0. contrib/llvm-project/libcxx/include/__exception/exception.h:115:14: Poco::Exception::Exception(String&&, int) @ 0x0000000064c76400
E   1. src/Common/Exception.cpp:139:7: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000002ff90d48
E   2. src/Common/Exception.h:171:100: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000001c5f0ad5
E   3. src/Common/Exception.h:57:54: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000001c5ef43e
E   4. src/Common/Exception.h:189:77: DB::Exception::Exception<>(int, FormatStringHelperImpl<>) @ 0x000000002ff9c72e
E   5. src/Storages/IPartitionStrategy.cpp:144:19: DB::PartitionStrategyFactory::get(DB::PartitionStrategyFactory::StrategyType, boost::intrusive_ptr<DB::IAST>, DB::NamesAndTypesList const&, std::shared_ptr<DB::Context const>, String const&, bool, bool, bool) @ 0x000000005193a810
E   6. src/Storages/ObjectStorage/StorageObjectStorageConfiguration.cpp:216:26: DB::StorageObjectStorageConfiguration::initPartitionStrategy(boost::intrusive_ptr<DB::IAST>, DB::ColumnsDescription const&, std::shared_ptr<DB::Context const>) @ 0x000000003d16a88e
E   7. src/Storages/ObjectStorage/StorageObjectStorage.cpp:145:20: DB::StorageObjectStorage::StorageObjectStorage(std::shared_ptr<DB::StorageObjectStorageConfiguration>, std::shared_ptr<DB::IObjectStorage>, std::shared_ptr<DB::Context const>, DB::StorageID const&, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, String const&, std::optional<DB::FormatSettings>, DB::LoadingStrictnessLevel, std::shared_ptr<DataLake::ICatalog>, bool, bool, bool, boost::intrusive_ptr<DB::IAST>, boost::intrusive_ptr<DB::IAST>, bool, bool) @ 0x000000003d12621f
E   8. contrib/llvm-project/libcxx/include/__memory/construct_at.h:37:49: DB::StorageObjectStorage* std::construct_at[abi:fqe220101]<DB::StorageObjectStorage, std::shared_ptr<DB::StorageObjectStorageConfiguration>&, std::shared_ptr<DB::IObjectStorage>&, std::shared_ptr<DB::Context const>&, DB::StorageID, DB::ColumnsDescription&, DB::ConstraintsDescription, String, std::nullopt_t const&, DB::LoadingStrictnessLevel, std::nullptr_t, bool, bool, bool, boost::intrusive_ptr<DB::IAST> const&, std::nullptr_t, bool, DB::StorageObjectStorage*>(DB::StorageObjectStorage*, std::shared_ptr<DB::StorageObjectStorageConfiguration>&, std::shared_ptr<DB::IObjectStorage>&, std::shared_ptr<DB::Context const>&, DB::StorageID&&, DB::ColumnsDescription&, DB::ConstraintsDescription&&, String&&, std::nullopt_t const&, DB::LoadingStrictnessLevel&&, std::nullptr_t&&, bool&&, bool&&, bool&&, boost::intrusive_ptr<DB::IAST> const&, std::nullptr_t&&, bool&&) @ 0x000000003792b793
E   9. contrib/llvm-project/libcxx/include/__memory/construct_at.h:45:10: std::shared_ptr<DB::StorageObjectStorage> std::allocate_shared[abi:fqe220101]<DB::StorageObjectStorage, std::allocator<DB::StorageObjectStorage>, std::shared_ptr<DB::StorageObjectStorageConfiguration>&, std::shared_ptr<DB::IObjectStorage>&, std::shared_ptr<DB::Context const>&, DB::StorageID, DB::ColumnsDescription&, DB::ConstraintsDescription, String, std::nullopt_t const&, DB::LoadingStrictnessLevel, std::nullptr_t, bool, bool, bool, boost::intrusive_ptr<DB::IAST> const&, std::nullptr_t, bool, 0>(std::allocator<DB::StorageObjectStorage> const&, std::shared_ptr<DB::StorageObjectStorageConfiguration>&, std::shared_ptr<DB::IObjectStorage>&, std::shared_ptr<DB::Context const>&, DB::StorageID&&, DB::ColumnsDescription&, DB::ConstraintsDescription&&, String&&, std::nullopt_t const&, DB::LoadingStrictnessLevel&&, std::nullptr_t&&, bool&&, bool&&, bool&&, boost::intrusive_ptr<DB::IAST> const&, std::nullptr_t&&, bool&&) @ 0x000000003792b0d4
E   10. contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:690:10: DB::TableFunctionObjectStorage<DB::S3Definition, DB::StorageS3Configuration, false>::executeImpl(boost::intrusive_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const>, String const&, DB::ColumnsDescription, bool) const @ 0x000000003782f651
E   11. src/TableFunctions/ITableFunction.cpp:69:16: DB::ITableFunction::execute(boost::intrusive_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const>, String const&, DB::ColumnsDescription, bool, bool) const @ 0x000000003cf1aa27
E   12. src/Interpreters/InterpreterInsertQuery.cpp:182:36: DB::InterpreterInsertQuery::getTable(DB::ASTInsertQuery&) @ 0x00000000422bd0c3
E   13. src/Interpreters/InterpreterInsertQuery.cpp:1001:24: DB::InterpreterInsertQuery::execute() @ 0x00000000422cee95
E   14. src/Interpreters/executeQuery.cpp:1830:40: DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, std::unique_ptr<DB::ReadBuffer, std::default_delete<DB::ReadBuffer>>&, boost::intrusive_ptr<DB::IAST>&, std::shared_ptr<DB::ImplicitTransactionControlExecutor>, std::function<void ()>, DB::QueryResultDetails&) @ 0x0000000042bea577
E   15. src/Interpreters/executeQuery.cpp:2224:11: DB::executeQuery(std::basic_string_view<char, std::char_traits<char>>, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x0000000042bdeef0
E   16. src/Server/TCPHandler.cpp:869:68: DB::TCPHandler::runImpl() @ 0x0000000053ce49d3
E   17. src/Server/TCPHandler.cpp:3178:9: DB::TCPHandler::run() @ 0x0000000053d2ea6d
E   18. base/poco/Net/src/TCPServerConnection.cpp:40:3: Poco::Net::TCPServerConnection::start() @ 0x0000000064e54f2f
E   19. base/poco/Net/src/TCPServerDispatcher.cpp:115:42: Poco::Net::TCPServerDispatcher::run() @ 0x0000000064e55ddb
E   20. base/poco/Foundation/src/ThreadPool.cpp:207:14: Poco::PooledThread::run() @ 0x0000000064d59fbf
E   21. base/poco/Foundation/src/Thread_POSIX.cpp:341:27: Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000064d52df0
E   22. asan_thread_start(void*) @ 0x000000001c58e8a1
E   23. start_thread @ 0x0000000000094ac3
E   24. clone3 @ 0x00000000001268d0
E   . (BAD_ARGUMENTS)
E   (query: INSERT INTO TABLE FUNCTION
E           s3('http://minio1:9001/root/d980f72e-c3d5-4185-94d7-0ef1d1350ddd/test_{_partition_id}.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32')
E           PARTITION BY column3 VALUES (1, 2, 3), (3, 2, 1), (78, 43, 45))

@fm4v

fm4v commented Jul 7, 2026

Copy link
Copy Markdown
Member

@tiandiwonder @LefterisXefteris kind ping, this is a critical fix for 26.6

@LefterisXefteris

Copy link
Copy Markdown
Author

@fm4v @kssenii hello there i am so sorry, i totally missed the notifications from github, my bad. i am sort it it out now

…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 ClickHouse#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]>

-- Write 16 tiny files. Each is far below 2 * max_download_buffer_size, i.e. "object_too_small",
-- so it takes the prefetch path.
INSERT INTO FUNCTION s3(s3_conn, filename='04000_prefetch_{_partition_id}.tsv', format='TSV', partition_strategy='wildcard')

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.

this file already exists on master (added by 76ba4ae after your base), so committing a parallel copy makes an add/add conflict — the PR is now unmergeable and CI can't start on this head. merge master into the branch and keep the partition_strategy='wildcard' edit as a normal modification; the edit itself is right, master's unguarded insert is exactly why this test failed on 5 stateless lanes in the previous run.

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.

Resolved — merged master into the branch and kept the partition_strategy='wildcard' edit as a modification of master's file (merge commit 054609c).

…on-id-compatibility-106465

# Conflicts:
#	tests/queries/0_stateless/04000_s3_table_function_small_file_prefetch.sql
Comment thread src/Storages/StorageURL.cpp Resolved
…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.
| `account_key` | Storage account key. **Required** when using `storage_account_url` without SAS; must **not** be passed when using `connection_string`. |
| `format` | The [format](/sql-reference/formats) of the file. |
| `compression` | Supported values: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`. By default, it will autodetect compression by file extension (same as setting to `auto`). |
| `partition_strategy` | Optional. Supported values: `WILDCARD` or `HIVE`. `WILDCARD` requires a `{_partition_id}` in the path, which is replaced with the partition key. `HIVE` does not allow wildcards, assumes the path is the table root, and generates Hive-style partitioned directories with Snowflake IDs as file names and the file format as the extension. |

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.

This added row duplicates the existing partition_strategy entry immediately below, so the rendered Arguments table now shows the same parameter twice. I think this should be collapsed back to a single row, keeping the default/partition_columns_in_data_file details in one place.

@clickhouse-gh

clickhouse-gh Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 79.80% 85.90% +6.10%
Functions 91.70% 92.70% +1.00%
Branches 72.00% 78.00% +6.00%

Changed lines: Changed C/C++ lines covered: 35/35 (100.00%) · Uncovered code

Full report · Diff report

@tiandiwonder
tiandiwonder added this pull request to the merge queue Jul 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 20, 2026
@tiandiwonder
tiandiwonder added this pull request to the merge queue Jul 21, 2026
Merged via the queue into ClickHouse:master with commit 0eb9389 Jul 21, 2026
174 of 176 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 21, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jul 21, 2026
robot-ch-test-poll4 added a commit that referenced this pull request Jul 21, 2026
Cherry pick #107437 to 26.6: Fix hive partition validation when compatibility is 26.6
robot-clickhouse added a commit that referenced this pull request Jul 21, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jul 21, 2026
clickhouse-gh Bot added a commit that referenced this pull request Jul 21, 2026
Backport #107437 to 26.6: Fix hive partition validation when compatibility is 26.6
@clickgapai

Copy link
Copy Markdown
Contributor

Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.

TL;DR

Fix hive partition validation when compatibility is 26.6

ClickGap verified: reproduced it with the script below on 26.6; tested 2 version(s) — 1 affected, 1 clean (see Affects); bisected to a candidate range — a single introducing PR could not be pinned (see Bisect).

Reproduction

SET file_like_engine_default_partition_strategy = 'hive';
-- Fixed: raises BAD_ARGUMENTS "Partition strategy hive can not be used with a '_partition_id' wildcard".
-- Buggy (26.6): the table is silently created (implicit hive default promoted to wildcard).
CREATE TABLE t (a UInt64, b String)
ENGINE = S3('http://localhost:9000/bucket/data_{_partition_id}.parquet', 'Parquet')
PARTITION BY a;

Bisect

Affects

  • Verified against master build 0eb93894361c (aarch64)
  • ✓ Fix is on master — this PR's change fixes the bug on master. Branches below still have the bug and need the backport.
  • Reproduces on: 26.6
  • Does NOT reproduce on: master
  • Feature not present (repro inconclusive — the affected code path postdates these releases): 26.5, 26.4, 26.3, 26.2, 26.1
  • Backport needed: 26.6

Suggested next step

The bug reproduces as far back as the oldest tested release (26.6) and the only converged boundary is topically unrelated — this is a long-standing / pre-existing bug in comp-object-storage, not a recent regression; no introducing PR exists within the tested range.

Component: comp-object-storage
Severity: P2

cc fix PR reviewer: @tiandiwonder @kssenii


ClickGap · Finding: phase_d_pr107437

Triage metadata

  • Primary component: comp-object-storage
  • Secondary components: comp-testing, comp-documentation
  • Component owners (comp-object-storage): @scanhex12 @kssenii

pull Bot pushed a commit to peijunlin2008/ClickHouse that referenced this pull request Jul 25, 2026
After ClickHouse#107437, a CREATE
statement with a `{_partition_id}` placeholder in the path and no
explicit `partition_strategy` was rejected with `BAD_ARGUMENTS` whenever
the effective `file_like_engine_default_partition_strategy` default was
`hive` (the default since 26.6). This broke pre-26.6 DDL and DDL
generators that rely on the implicit wildcard strategy.

A `{_partition_id}` placeholder is valid only under the `wildcard`
strategy, so when no explicit strategy is given the path alone
determines the only strategy that can work. `initPartitionStrategy` now
infers `wildcard` from the path shape on CREATE, the same way it already
does on ATTACH / server startup / RESTORE. The default setting only
applies to paths without the placeholder, and an explicit
`partition_strategy = 'hive'` still rejects such paths.

Related: ClickHouse#106465
Related: ClickHouse#86746
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
After ClickHouse#107437, a CREATE
statement with a `{_partition_id}` placeholder in the path and no
explicit `partition_strategy` was rejected with `BAD_ARGUMENTS` whenever
the effective `file_like_engine_default_partition_strategy` default was
`hive` (the default since 26.6). This broke pre-26.6 DDL and DDL
generators that rely on the implicit wildcard strategy.

A `{_partition_id}` placeholder is valid only under the `wildcard`
strategy, so when no explicit strategy is given the path alone
determines the only strategy that can work. `initPartitionStrategy` now
infers `wildcard` from the path shape on CREATE, the same way it already
does on ATTACH / server startup / RESTORE. The default setting only
applies to paths without the placeholder, and an explicit
`partition_strategy = 'hive'` still rejects such paths.

Related: ClickHouse#106465
Related: ClickHouse#86746
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…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 ClickHouse#107437.

Co-authored-by: Cursor <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…e-partition-id-compatibility-106465

Fix hive partition validation when compatibility is 26.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors manual approve Manual approve required to run CI pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v26.6-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

S3 engine is accepted with partition_strategy='hive' and {_partition_id} placeholder

9 participants