Repository navigation
Populate _etag virtual column for S3Queue/ObjectStorageQueue - #108625
alexey-milovidov merged 1 commit into
Conversation
The _etag virtual column is declared for ObjectStorageQueue engines (S3Queue, AzureQueue) via the shared file-like virtual column list, but the read path built the virtuals struct without the etag pointer, so SELECT _etag always returned an empty string. The plain S3 engine and the s3() function fill it correctly. The etag is already available at that point (object_metadata->etag, also used for the deduplication token), so this just passes it through, the same way StorageObjectStorageSource does. A regression test is added to test_storage_s3_queue test_virtual_columns: it now also reads _etag and asserts it is non-empty. The test fails before this change (empty etag) and passes after. Closes: ClickHouse#108605 Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-3:20260626-140700 |
|
cc @kssenii @scanhex12 — could you review this? S3Queue/AzureQueue declared the |
|
Workflow [PR], commit [17ac157] Summary: ✅
AI ReviewSummaryThis PR fixes Final VerdictStatus: ✅ Approve |
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 7/7 (100.00%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 3 line(s) · Uncovered code |
CI finish ledger — 17ac157CI fully finished: Finish Workflow and Mergeable Check pass; 0 test-level FAIL/ERROR in CIDB on this commit. The only red check is the ClickHouse Inc private sync, which is not actionable from the public fork.
Session id: cron:our-pr-ci-monitor:20260626-183000 |
|
Thanks! Any other columns we don't populate? E.g., |
|
@alexey-milovidov Audited the ObjectStorageQueue read path against the shared file-like virtual column list.
PR to follow. |
…5-s3queue-etag-virtual-column Populate _etag virtual column for S3Queue/ObjectStorageQueue
Closes: #108605
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed the
_etagvirtual column for theS3QueueandAzureQueuetable engines: it was declared but never populated, soSELECT _etagalways returned an empty string. It now returns the object ETag, like theS3engine and thes3()table function.Description
The
_etagvirtual column is declared forObjectStorageQueueengines (S3Queue,AzureQueue) through the shared file-like virtual column list, but the read path inObjectStorageQueueSourcebuilt the virtuals struct without theetagpointer. SinceVirtualsForFileLikeStorage::etagdefaults tonullptr,_etagwas always filled with a default empty string. The plainS3engine and thes3()function populate it correctly.The ETag is already in scope at the call site (
object_metadata->etag, also used to build the deduplication token a few lines above), so this just forwards it, mirroringStorageObjectStorageSource.Note:
_tagsis also omitted at the same call site, but the queue iterator lists objects withwith_tags = false, so tags are genuinely not fetched on the queue read path. Populating_tagswould be a separate, larger change and is out of scope here.Reproduction (reported on 26.4, still present on master):
SELECT _etagfrom anS3Queue/AzureQueuetable (directly or via a materialized view) returns an empty string instead of the object ETag.Version info
26.7.1.140