From ec636e95cd3c87b51258e49bb40c74a52f91506c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC=20=D0=A1=D1=82=D1=80=D0=B5?= =?UTF-8?q?=D0=BB=D1=8C=D1=86=D0=BE=D0=B2?= Date: Tue, 12 Nov 2019 00:34:28 +0300 Subject: [PATCH] Added lifetime to system.dictionaries --- dbms/src/Storages/System/StorageSystemDictionaries.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dbms/src/Storages/System/StorageSystemDictionaries.cpp b/dbms/src/Storages/System/StorageSystemDictionaries.cpp index c31d514cf08..4baf0994646 100644 --- a/dbms/src/Storages/System/StorageSystemDictionaries.cpp +++ b/dbms/src/Storages/System/StorageSystemDictionaries.cpp @@ -40,6 +40,8 @@ NamesAndTypesList StorageSystemDictionaries::getNamesAndTypes() {"loading_duration", std::make_shared()}, //{ "creation_time", std::make_shared() }, {"last_exception", std::make_shared()}, + {"dictionary_lifetime_min", std::make_shared()}, + {"dictionary_lifetime_max", std::make_shared()} }; } @@ -93,6 +95,10 @@ void StorageSystemDictionaries::fillData(MutableColumns & res_columns, const Con res_columns[i++]->insert(getExceptionMessage(last_exception, false)); else res_columns[i++]->insertDefault(); + + const auto & lifetime = dict_ptr->getLifetime(); + res_columns[i++]->insert(lifetime.min_sec); + res_columns[i++]->insert(lifetime.max_sec); } }