ClickHouse/src/Storages/MergeTree/MergeTreeReverseSelectProcessor.h

44 lines
1.4 KiB
C++
Raw Normal View History

#pragma once
#include <Storages/MergeTree/MergeTreeSelectProcessor.h>
namespace DB
{
/// Used to read data from single part with select query
/// in reverse order of primary key.
/// Cares about PREWHERE, virtual columns, indexes etc.
/// To read data from multiple parts, Storage (MergeTree) creates multiple such objects.
class MergeTreeReverseSelectProcessor : public MergeTreeSelectProcessor
{
public:
2019-10-01 16:50:08 +00:00
MergeTreeReverseSelectProcessor(
const MergeTreeData & storage,
const StorageMetadataPtr & metadata_snapshot,
const MergeTreeData::DataPartPtr & owned_data_part,
UInt64 max_block_size_rows,
size_t preferred_block_size_bytes,
size_t preferred_max_column_in_block_size_bytes,
2020-03-09 02:55:28 +00:00
Names required_columns_,
2019-10-04 15:40:05 +00:00
MarkRanges mark_ranges,
bool use_uncompressed_cache,
const PrewhereInfoPtr & prewhere_info,
2021-06-25 14:49:28 +00:00
ExpressionActionsSettings actions_settings,
bool check_columns,
const MergeTreeReaderSettings & reader_settings,
const Names & virt_column_names = {},
bool has_limit_below_one_block_ = false,
bool quiet = false);
String getName() const override { return "MergeTreeReverse"; }
private:
bool getNewTask() override;
2019-10-01 16:50:08 +00:00
Chunk readFromPart() override;
2019-10-01 16:50:08 +00:00
Chunks chunks;
2020-05-30 21:57:37 +00:00
Poco::Logger * log = &Poco::Logger::get("MergeTreeReverseSelectProcessor");
};
}