Repository navigation
Native Common Virtuals for Remaining Storage - #102304
Conversation
|
Workflow [PR], commit [a5b16de] Summary: ❌
AI ReviewSummaryThis PR refactors virtual-column handling by introducing Findings❌ Blockers
Tests
ClickHouse Rules
Final VerdictStatus: ❌ Block Minimum required actions:
|
56742b2 to
d035078
Compare
| { | ||
| VirtualColumnsDescription desc; | ||
| desc.addEphemeral("_table", std::make_shared<DataTypeLowCardinality>(std::make_shared<DataTypeString>()), ""); | ||
| desc.addEphemeral("_table", std::make_shared<DataTypeLowCardinality>(std::make_shared<DataTypeString>()), "", VirtualsMaterializationPlace::Plan); |
There was a problem hiding this comment.
StorageStripeLog defines _table/_database as VirtualsMaterializationPlace::Plan, but this storage still uses the legacy Pipe read(...) path and never goes through StorageWithCommonVirtualColumns::read, so Plan-level virtuals are never materialized here.
In this same function, splitPhysicalAndVirtualColumnNames only accepts Reader-level virtuals. A query like SELECT _table FROM stripe_log_table therefore fails with Column '_table' is neither physical nor virtual.
Please register these virtuals as VirtualsMaterializationPlace::Reader for StorageStripeLog, or migrate this storage to StorageWithCommonVirtualColumns so Plan-level materialization actually runs.
LLVM Coverage Report
Changed lines: 92.37% (1513/1638) | lost baseline coverage: 133 line(s) · Uncovered code |
|
There are 2 problems I discovered:
|
Verifies that selecting `_table` and `_database` from a `Merge` over a `Distributed` table together with a `LEFT JOIN` returns the real virtual column values when the analyzer is enabled. Issue: ClickHouse#84139 Fixed by: - ClickHouse#102304 - ClickHouse#102471 Co-authored-by: Yakov Olkhovskiy <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Unfortunately, we need to support this for backward compatibility.
Version info
26.4.1.833