Repository navigation
Read the Hive partition columns from the path in a direct SELECT from S3Queue and AzureQueue - #131975
Conversation
…ueue A direct SELECT from an S3Queue/AzureQueue table with use_hive_partitioning = 1 called prepareReadingFromFormat without PrepareReadingFromFormatHiveParams, so the Hive columns were treated as file columns: the format returned the file's value or the column default, and ObjectStorageQueueSource never appended the value from the path. streamToViews already passes these parameters, which is why a materialized view over the same table was correct. Pass the same parameters in StorageObjectStorageQueue::read. A table without Hive columns has empty file_columns and an empty map, which prepareReadingFromFormat treats like the previous default call. The same call change is part of the open ClickHouse#105774, where positional reads need it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings;
Severity: ❌ blocker / Session id: cron:clickhouse-review-self-slot-58:20261116-113103 |
|
cc @kssenii, could you review this? StorageObjectStorageQueue::read now passes the same PrepareReadingFromFormatHiveParams as streamToViews, so a direct SELECT from S3Queue/AzureQueue with use_hive_partitioning = 1 takes the Hive partition columns from the path instead of reading them from the file. |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-self-slot-57:20261116-105900 |
|
Workflow [PR], commit [6c82fc2] Summary: ❌
AI ReviewSummaryDirect Findings❌ Blockers
Tests
Missing context / blind spots
Final VerdictStatus: ❌ Block Make partition values available to dependent defaults and add the focused regression coverage above. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 14 s compile time in total, 7 of them have a recent master baseline. |
48dd41b
Related: #131571 (comment)
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
A direct
SELECTfrom anS3QueueorAzureQueuetable withuse_hive_partitioning = 1now takes the Hive partition columns from the file path, as the materialized view path and thes3table function do.Description
With
enable_object_storage_queue_hive_partitioning = 1, a directSELECT c0, k FROM queue(stream_like_engine_allow_direct_select = 1) overk=abc/data.jsonlreturnsk = '', or the file's ownkwhen the file has one, while a materialized view over the same table ands3(...)returnabc.WHERE k = 'abc'returns no rows. No related open issue found; it came up in theS3Queuequestion on #131571.StorageObjectStorageQueue::readcalledprepareReadingFromFormatwithout thePrepareReadingFromFormatHiveParamsthatstreamToViewspasses, so the format read the Hive columns from the file and the source never appended them from the path. The change passes the same parameters. A table without Hive columns gets empty parameters, which is the previous call.Improvementrather thanBug Fix: queue Hive columns are behind the experimental setting above.The same call change is part of the open #105774 (positional reads), where its column mapping needs it; this PR lands it alone with a regression test. A subcolumn of a Hive column (
k.null) now fails withNOT_FOUND_COLUMN_IN_BLOCK, as it already does fors3(); #124392 fixes that for all file-like storages.The test fails on master (
1 '',2 file) and passes with the fix (50/50 randomized); the S3Queue tests runnable here pass. Also checked:SELECT *,_path, column order, aBoolkey withbool_true_representation,NullableandLowCardinalitykeys,commit_on_select = 1, a table without Hive columns, and the materialized view path (unchanged).🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131975]
Version info
26.12.1.89-master(included in26.12and later)