#pragma once #include #include #include #include namespace DB { class MergeTreeIndexReader { public: MergeTreeIndexReader( MergeTreeIndexPtr index_, MergeTreeData::DataPartPtr part_, size_t marks_count_, const MarkRanges & all_mark_ranges_, MarkCache * mark_cache, UncompressedCache * uncompressed_cache, MergeTreeReaderSettings settings); ~MergeTreeIndexReader(); void seek(size_t mark); MergeTreeIndexGranulePtr read(); private: MergeTreeIndexPtr index; std::unique_ptr stream; uint8_t version = 0; }; }