Fix 01457_create_as_table_function_structure#28428
Fix 01457_create_as_table_function_structure#28428kssenii merged 6 commits intoClickHouse:masterfrom
Conversation
ca6a028 to
185d294
Compare
src/Storages/StorageTableFunction.h
Outdated
| StoragePolicyPtr getStoragePolicy() const override | ||
| { | ||
| if (nested) | ||
| return StorageProxy::getStoragePolicy(); | ||
| return IStorage::getStoragePolicy(); | ||
| } |
There was a problem hiding this comment.
It may work incorrectly, because caller may expect that getStoragePolicy() returns actual storage policy of nested storage.
There was a problem hiding this comment.
(on the other hand, currently there is no way to create a table with non-empty storage policy from table function, so we will never sight that it does not work, but it looks tricky anyway)
There was a problem hiding this comment.
btw it is already used this way
ClickHouse/src/Storages/StorageTableFunction.h
Lines 131 to 137 in 307ae34
There was a problem hiding this comment.
Not precisely renameInMemory has a bit different semantics. If nested storage is already loaded, then update both storage names, but if nested storage is not loaded yet (so we cannot update it), then update proxy storage name and set nested storage name on future loading.
src/Storages/StorageTableFunction.h
Outdated
|
|
||
| StoragePolicyPtr getStoragePolicy() const override | ||
| { | ||
| if (nested) |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Was broken only for DatabaseOrdinary by #25251.