mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 08:52:06 +00:00
fix
This commit is contained in:
parent
69052b3fc0
commit
35dbb94312
@ -620,6 +620,8 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mergePartsToTempor
|
||||
}
|
||||
|
||||
|
||||
ExpressionActionsPtr stream_expr = data.sorting_key_expr;
|
||||
/// TODO: добавлять стобцы из индексов
|
||||
for (const auto & part : parts)
|
||||
{
|
||||
auto input = std::make_unique<MergeTreeSequentialBlockInputStream>(
|
||||
@ -628,11 +630,14 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mergePartsToTempor
|
||||
input->setProgressCallback(MergeProgressCallback(
|
||||
merge_entry, sum_input_rows_upper_bound, column_sizes, watch_prev_elapsed, merge_alg));
|
||||
|
||||
if (data.hasPrimaryKey())
|
||||
src_streams.emplace_back(std::make_shared<MaterializingBlockInputStream>(
|
||||
std::make_shared<ExpressionBlockInputStream>(BlockInputStreamPtr(std::move(input)), data.sorting_key_expr)));
|
||||
else
|
||||
if (data.hasPrimaryKey()) {
|
||||
auto stream = std::make_shared<MaterializingBlockInputStream>(
|
||||
std::make_shared<ExpressionBlockInputStream>(
|
||||
BlockInputStreamPtr(std::move(input)), stream_expr));
|
||||
src_streams.emplace_back(stream);
|
||||
} else {
|
||||
src_streams.emplace_back(std::move(input));
|
||||
}
|
||||
}
|
||||
|
||||
Names sort_columns = data.sorting_key_columns;
|
||||
|
@ -57,8 +57,25 @@ public:
|
||||
using IndexConditionPtr = std::shared_ptr<IndexCondition>;
|
||||
|
||||
|
||||
struct MergeTreeIndexGranule
|
||||
{
|
||||
friend MergeTreeIndexPart;
|
||||
|
||||
public:
|
||||
virtual ~MergeTreeIndexGranule();
|
||||
|
||||
virtual void serializeBinary() const = 0;
|
||||
virtual void deserializeBinary() const = 0;
|
||||
|
||||
virtual void update(const Block & block, size_t first, size_t last) = 0;
|
||||
};
|
||||
|
||||
using MergeTreeIndexGranulePtr = std::shared_ptr<MergeTreeIndexGranule>;
|
||||
|
||||
|
||||
/// Data structure for operations with index data for each MergeTreeDataPart.
|
||||
/// Stores information specific for DataPart.
|
||||
/// Возможно будет убран.
|
||||
struct MergeTreeIndexPart
|
||||
{
|
||||
friend MergeTreeIndex;
|
||||
@ -71,10 +88,11 @@ public:
|
||||
|
||||
virtual MergeTreeIndexPartPtr cloneEmpty() const = 0;
|
||||
|
||||
virtual MergeTreeIndexGranulePtr createIndexGranule() const = 0;
|
||||
virtual IndexConditionPtr createIndexConditionOnPart(
|
||||
const SelectQueryInfo & query_info, const Context & context) const = 0;
|
||||
|
||||
MergeTreeIndexPtr index; // if parts can migrate to another tables it can be bad
|
||||
MergeTreeIndexPtr index;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user