Skip to content

Commit 05d44f4

Browse files
committed
add virtual column registration
1 parent 5cfc7d7 commit 05d44f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Storages/StorageDistributed.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,11 @@ void StorageDistributed::setAdditionalTableFunctions(std::vector<TableFunctionEn
22022202
{
22032203
additional_table_functions = std::move(additional_table_functions_);
22042204
log = getLogger("TieredDistributedMerge (" + getStorageID().table_name + ")");
2205+
2206+
auto virtuals = createVirtuals();
2207+
// or _layer_index?
2208+
virtuals.addEphemeral("_table_index", std::make_shared<DataTypeUInt32>(), "Index of the table function in TieredDistributedMerge (0 for main table, 1+ for additional table functions)");
2209+
setVirtuals(virtuals);
22052210
}
22062211

22072212
void registerStorageDistributed(StorageFactory & factory)

0 commit comments

Comments
 (0)