Fix for distributed queries

This commit is contained in:
Igor Nikonov 2022-12-14 13:54:42 +00:00
parent db6e1acc14
commit 03f7bd1192
2 changed files with 1 additions and 2 deletions

View File

@ -14,7 +14,7 @@ QueryPlanOptimizationSettings QueryPlanOptimizationSettings::fromSettings(const
settings.distinct_in_order = from.optimize_distinct_in_order;
settings.read_in_order = from.optimize_read_in_order && from.query_plan_read_in_order;
settings.aggregation_in_order = from.optimize_aggregation_in_order && from.query_plan_aggregation_in_order;
settings.remove_redundant_distinct = from.query_plan_remove_redundant_distinct;
settings.remove_redundant_distinct = from.query_plan_remove_redundant_distinct && !from.distributed_group_by_no_merge;
return settings;
}

View File

@ -51,7 +51,6 @@ size_t tryRemoveRedundantDistinct(QueryPlan::Node * parent_node, QueryPlan::Node
return 0;
chassert(!distinct_node->children.empty());
chassert(typeid_cast<ExpressionStep *>(distinct_node->children.front()->step.get()));
/// delete current distinct
parent_node->children[0] = distinct_node->children.front();