diff options
author | vitalyisaev <vitalyisaev@ydb.tech> | 2023-11-14 09:58:56 +0300 |
---|---|---|
committer | vitalyisaev <vitalyisaev@ydb.tech> | 2023-11-14 10:20:20 +0300 |
commit | c2b2dfd9827a400a8495e172a56343462e3ceb82 (patch) | |
tree | cd4e4f597d01bede4c82dffeb2d780d0a9046bd0 /contrib/clickhouse/src/Storages/System/StorageSystemLicenses.cpp | |
parent | d4ae8f119e67808cb0cf776ba6e0cf95296f2df7 (diff) | |
download | ydb-c2b2dfd9827a400a8495e172a56343462e3ceb82.tar.gz |
YQ Connector: move tests from yql to ydb (OSS)
Перенос папки с тестами на Коннектор из папки yql в папку ydb (синхронизируется с github).
Diffstat (limited to 'contrib/clickhouse/src/Storages/System/StorageSystemLicenses.cpp')
-rw-r--r-- | contrib/clickhouse/src/Storages/System/StorageSystemLicenses.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/clickhouse/src/Storages/System/StorageSystemLicenses.cpp b/contrib/clickhouse/src/Storages/System/StorageSystemLicenses.cpp new file mode 100644 index 0000000000..6f880f03e1 --- /dev/null +++ b/contrib/clickhouse/src/Storages/System/StorageSystemLicenses.cpp @@ -0,0 +1,31 @@ +#include "StorageSystemLicenses.h" + +#include <algorithm> +#include <DataTypes/DataTypeString.h> + + +extern const char * library_licenses[]; + +namespace DB +{ +NamesAndTypesList StorageSystemLicenses::getNamesAndTypes() +{ + return { + {"library_name", std::make_shared<DataTypeString>()}, + {"license_type", std::make_shared<DataTypeString>()}, + {"license_path", std::make_shared<DataTypeString>()}, + {"license_text", std::make_shared<DataTypeString>()}, + }; +} + +void StorageSystemLicenses::fillData(MutableColumns & res_columns, ContextPtr, const SelectQueryInfo &) const +{ + for (const auto * it = library_licenses; *it; it += 4) + { + res_columns[0]->insert(String(it[0])); + res_columns[1]->insert(String(it[1])); + res_columns[2]->insert(String(it[2])); + res_columns[3]->insert(String(it[3])); + } +} +} |