mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
Some fixes
This commit is contained in:
parent
77a0c47591
commit
13a05adcb9
@ -84,8 +84,8 @@ public:
|
|||||||
|
|
||||||
if (schema_info.ttl)
|
if (schema_info.ttl)
|
||||||
{
|
{
|
||||||
/// Current value in cache is valid and we can resume it's TTL bu updating it's expiration time.
|
/// Current value in cache is valid and we can resume it's TTL by updating it's expiration time.
|
||||||
/// We will extract current value from the expiration queue, modify it and insert back to the queue..
|
/// We will extract current value from the expiration queue, modify it and insert back to the queue.
|
||||||
time_t now = std::time(nullptr);
|
time_t now = std::time(nullptr);
|
||||||
auto jt = expiration_queue.find({schema_info.valid_until, key});
|
auto jt = expiration_queue.find({schema_info.valid_until, key});
|
||||||
auto node = expiration_queue.extract(jt);
|
auto node = expiration_queue.extract(jt);
|
||||||
|
@ -208,7 +208,11 @@ ColumnsDescription StorageHDFS::getTableStructureFromData(
|
|||||||
std::make_unique<ReadBufferFromHDFS>(uri_without_path, *it++, ctx->getGlobalContext()->getConfigRef()), compression);
|
std::make_unique<ReadBufferFromHDFS>(uri_without_path, *it++, ctx->getGlobalContext()->getConfigRef()), compression);
|
||||||
};
|
};
|
||||||
|
|
||||||
auto columns = readSchemaFromFormat(format, std::nullopt, read_buffer_iterator, paths.size() > 1, ctx);
|
ColumnsDescription columns;
|
||||||
|
if (columns_from_cache)
|
||||||
|
columns = *columns_from_cache;
|
||||||
|
else
|
||||||
|
columns = readSchemaFromFormat(format, std::nullopt, read_buffer_iterator, paths.size() > 1, ctx);
|
||||||
|
|
||||||
if (ctx->getSettingsRef().use_cache_for_hdfs_schema_inference)
|
if (ctx->getSettingsRef().use_cache_for_hdfs_schema_inference)
|
||||||
addColumnsToCache(paths, columns, ctx);
|
addColumnsToCache(paths, columns, ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user