materialize query

This commit is contained in:
Nikita Vasilev 2019-05-05 21:53:48 +03:00
parent 27aeb3a36d
commit 18593391b4
2 changed files with 3 additions and 7 deletions

View File

@ -979,11 +979,8 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor
/// Checks if columns used in skipping indexes modified.
std::set<MergeTreeIndexPtr> indices_to_recalc;
ASTPtr indices_recalc_expr_list = std::make_shared<ASTExpressionList>();
auto * log = &Poco::Logger::get("kek>>");
LOG_DEBUG(log, "columns: " << in_header.columns());
for (const auto & col : in_header.getNames())
{
LOG_DEBUG(log, col);
for (size_t i = 0; i < data.skip_indices.size(); ++i)
{
const auto & index = data.skip_indices[i];
@ -991,7 +988,6 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor
auto it = find(cbegin(index_cols), cend(index_cols), col);
if (it != cend(index_cols) && indices_to_recalc.insert(index).second)
{
LOG_DEBUG(log, ": " << index->name);
ASTPtr expr_list = MergeTreeData::extractKeyExpressionList(
storage_from_source_part->getIndices().indices[i]->expr->clone());
for (const auto & expr : expr_list->children)

View File

@ -842,9 +842,9 @@ void MergedColumnOnlyOutputStream::write(const Block & block)
/// Creating block for update
Block indices_update_block(skip_indexes_columns);
/// Filling and writing skip indices like in IMergedBlockOutputStream::writeColumn
for (size_t i = 0; i < storage.skip_indices.size(); ++i)
for (size_t i = 0; i < skip_indices.size(); ++i)
{
const auto index = storage.skip_indices[i];
const auto index = skip_indices[i];
auto & stream = *skip_indices_streams[i];
size_t prev_pos = 0;
@ -930,7 +930,7 @@ MergeTreeData::DataPart::Checksums MergedColumnOnlyOutputStream::writeSuffixAndG
}
/// Finish skip index serialization
for (size_t i = 0; i < storage.skip_indices.size(); ++i)
for (size_t i = 0; i < skip_indices.size(); ++i)
{
auto & stream = *skip_indices_streams[i];
if (!skip_indices_aggregators[i]->empty())