mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #28428 from kssenii/fix-database-ordinary-test
Fix 01457_create_as_table_function_structure
This commit is contained in:
commit
04b26d26bf
@ -101,7 +101,7 @@ public:
|
|||||||
void flush() override;
|
void flush() override;
|
||||||
void drop() override;
|
void drop() override;
|
||||||
|
|
||||||
bool storesDataOnDisk() const override { return true; }
|
bool storesDataOnDisk() const override { return data_volume != nullptr; }
|
||||||
Strings getDataPaths() const override;
|
Strings getDataPaths() const override;
|
||||||
|
|
||||||
ActionLock getActionLock(StorageActionBlockType type) override;
|
ActionLock getActionLock(StorageActionBlockType type) override;
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
setInMemoryMetadata(cached_metadata);
|
setInMemoryMetadata(cached_metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
StoragePtr getNested() const override
|
StoragePtr getNestedImpl() const
|
||||||
{
|
{
|
||||||
std::lock_guard lock{nested_mutex};
|
std::lock_guard lock{nested_mutex};
|
||||||
if (nested)
|
if (nested)
|
||||||
@ -46,6 +46,20 @@ public:
|
|||||||
return nested;
|
return nested;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StoragePtr getNested() const override
|
||||||
|
{
|
||||||
|
StoragePtr nested_storage = getNestedImpl();
|
||||||
|
assert(!nested_storage->getStoragePolicy());
|
||||||
|
assert(!nested_storage->storesDataOnDisk());
|
||||||
|
return nested_storage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Table functions cannot have storage policy and cannot store data on disk.
|
||||||
|
/// We may check if table is readonly or stores data on disk on DROP TABLE.
|
||||||
|
/// Avoid loading nested table by returning nullptr/false for all table functions.
|
||||||
|
StoragePolicyPtr getStoragePolicy() const override { return nullptr; }
|
||||||
|
bool storesDataOnDisk() const override { return false; }
|
||||||
|
|
||||||
String getName() const override
|
String getName() const override
|
||||||
{
|
{
|
||||||
std::lock_guard lock{nested_mutex};
|
std::lock_guard lock{nested_mutex};
|
||||||
|
Loading…
Reference in New Issue
Block a user