This commit is contained in:
Amos Bird 2021-05-11 18:22:23 +08:00
parent 5e9fab6d10
commit 074c2ead9c
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
2 changed files with 4 additions and 3 deletions

View File

@ -732,8 +732,9 @@ Block MergeTreeData::getBlockWithVirtualPartColumns(const MergeTreeData::DataPar
auto & part_uuid_column = columns[2];
auto & partition_value_column = columns[3];
for (const auto & part : parts)
for (const auto & part_or_projection : parts)
{
const auto * part = part_or_projection->isProjectionPart() ? part_or_projection->getParentPart() : part_or_projection.get();
part_column->insert(part->name);
partition_id_column->insert(part->info.partition_id);
part_uuid_column->insert(part->uuid);

View File

@ -196,7 +196,7 @@ QueryPlanPtr MergeTreeDataSelectExecutor::read(
// NOTE: prewhere is executed inside readFromParts
if (query_info.projection->before_where)
{
LOG_DEBUG(log, "projection before_where: {}", query_info.projection->before_where->dumpDAG());
// std::cerr << fmt::format("projection before_where: {}", query_info.projection->before_where->dumpDAG());
auto where_step = std::make_unique<FilterStep>(
plan->getCurrentDataStream(),
query_info.projection->before_where,
@ -209,7 +209,7 @@ QueryPlanPtr MergeTreeDataSelectExecutor::read(
if (query_info.projection->before_aggregation)
{
LOG_DEBUG(log, "projection before_aggregation: {}", query_info.projection->before_aggregation->dumpDAG());
// std::cerr << fmt::format("projection before_aggregation: {}", query_info.projection->before_aggregation->dumpDAG());
auto expression_before_aggregation
= std::make_unique<ExpressionStep>(plan->getCurrentDataStream(), query_info.projection->before_aggregation);
expression_before_aggregation->setStepDescription("Before GROUP BY");