mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 04:22:03 +00:00
moved indices
This commit is contained in:
parent
3f5447f471
commit
977b1e20d0
@ -31,6 +31,11 @@ void ITableDeclaration::setColumns(ColumnsDescription columns_)
|
||||
columns = std::move(columns_);
|
||||
}
|
||||
|
||||
void ITableDeclaration::setIndicesDescription(IndicesDescription indices_)
|
||||
{
|
||||
indices = std::move(indices_);
|
||||
}
|
||||
|
||||
|
||||
bool ITableDeclaration::hasColumn(const String & column_name) const
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Storages/ColumnsDescription.h>
|
||||
#include <Storages/IndicesDescription.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
@ -15,6 +16,9 @@ public:
|
||||
virtual const ColumnsDescription & getColumns() const { return columns; }
|
||||
virtual void setColumns(ColumnsDescription columns_);
|
||||
|
||||
virtual const IndicesDescription & getIndicesDescription() const { return indices; }
|
||||
virtual void setIndicesDescription(IndicesDescription indices_);
|
||||
|
||||
/// NOTE: These methods should include virtual columns, but should NOT include ALIAS columns
|
||||
/// (they are treated separately).
|
||||
virtual NameAndTypePair getColumn(const String & column_name) const;
|
||||
@ -52,6 +56,7 @@ public:
|
||||
|
||||
private:
|
||||
ColumnsDescription columns;
|
||||
IndicesDescription indices;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ void MergeTreeData::setSkipIndices(const IndicesDescription & indices, bool only
|
||||
{
|
||||
if (!only_check)
|
||||
{
|
||||
skip_indices_description = indices;
|
||||
setIndicesDescription(indices);
|
||||
skip_indices_expr = nullptr;
|
||||
skip_indices.clear();
|
||||
}
|
||||
@ -395,7 +395,7 @@ void MergeTreeData::setSkipIndices(const IndicesDescription & indices, bool only
|
||||
|
||||
if (!only_check)
|
||||
{
|
||||
skip_indices_description = indices;
|
||||
setIndicesDescription(indices);
|
||||
skip_indices_expr = new_skip_indices_expr;
|
||||
skip_indices = std::move(new_indices);
|
||||
}
|
||||
|
@ -588,7 +588,6 @@ public:
|
||||
/// Secondary (data skipping) indices for MergeTree
|
||||
MergeTreeIndices skip_indices;
|
||||
ASTPtr skip_indices_ast;
|
||||
IndicesDescription skip_indices_description;
|
||||
ExpressionActionsPtr skip_indices_expr;
|
||||
|
||||
/// Names of columns for primary key + secondary sorting columns.
|
||||
|
Loading…
Reference in New Issue
Block a user