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/Interpreters/FilesystemCacheLog.h | |
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/Interpreters/FilesystemCacheLog.h')
-rw-r--r-- | contrib/clickhouse/src/Interpreters/FilesystemCacheLog.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/contrib/clickhouse/src/Interpreters/FilesystemCacheLog.h b/contrib/clickhouse/src/Interpreters/FilesystemCacheLog.h new file mode 100644 index 0000000000..41a7c8e0fe --- /dev/null +++ b/contrib/clickhouse/src/Interpreters/FilesystemCacheLog.h @@ -0,0 +1,54 @@ +#pragma once + +#include <Core/NamesAndAliases.h> +#include <Core/NamesAndTypes.h> +#include <Core/Settings.h> +#include <DataTypes/DataTypeArray.h> +#include <DataTypes/DataTypeNumberBase.h> +#include <DataTypes/DataTypeTuple.h> +#include <Interpreters/SystemLog.h> +#include <Interpreters/TransactionVersionMetadata.h> + +namespace DB +{ + +struct FilesystemCacheLogElement +{ + enum class CacheType + { + READ_FROM_CACHE, + READ_FROM_FS_AND_DOWNLOADED_TO_CACHE, + READ_FROM_FS_BYPASSING_CACHE, + WRITE_THROUGH_CACHE, + }; + + time_t event_time{}; + + String query_id; + String source_file_path; + + std::pair<size_t, size_t> file_segment_range{}; + std::pair<size_t, size_t> requested_range{}; + CacheType cache_type{}; + std::string file_segment_key{}; + size_t file_segment_offset = 0; + size_t file_segment_size = 0; + bool read_from_cache_attempted; + String read_buffer_id{}; + std::shared_ptr<ProfileEvents::Counters::Snapshot> profile_counters = nullptr; + + static std::string name() { return "FilesystemCacheLog"; } + + static NamesAndTypesList getNamesAndTypes(); + static NamesAndAliases getNamesAndAliases() { return {}; } + + void appendToBlock(MutableColumns & columns) const; + static const char * getCustomColumnList() { return nullptr; } +}; + +class FilesystemCacheLog : public SystemLog<FilesystemCacheLogElement> +{ + using SystemLog<FilesystemCacheLogElement>::SystemLog; +}; + +} |