Address PR comments

This commit is contained in:
Antonio Andelic 2023-03-28 07:47:37 +00:00
parent d2c1d16e29
commit ac8dd527dc
2 changed files with 3 additions and 9 deletions

View File

@ -38,7 +38,6 @@
#include <Storages/IStorage.h>
#include <Analyzer/Utils.h>
#include <Analyzer/Passes/QueryAnalysisPass.h>
#include <Analyzer/ConstantNode.h>
#include <Analyzer/FunctionNode.h>
#include <Analyzer/SortNode.h>
@ -70,10 +69,6 @@
#include <Planner/CollectColumnIdentifiers.h>
#include <Planner/PlannerQueryProcessingInfo.h>
#include <Interpreters/getCustomKeyFilterForParallelReplicas.h>
#include <Storages/StorageDistributed.h>
namespace DB
{

View File

@ -1,7 +1,6 @@
#include <Planner/PlannerJoinTree.h>
#include <Common/scope_guard_safe.h>
#include "Storages/SelectQueryInfo.h"
#include <Columns/ColumnAggregateFunction.h>
@ -439,8 +438,8 @@ FilterDAGInfo buildRowPolicyFilterIfNeeded(const StoragePtr & storage,
}
FilterDAGInfo buildCustomKeyFilterIfNeeded(const StoragePtr & storage,
SelectQueryInfo & table_expression_query_info,
PlannerContextPtr & planner_context)
SelectQueryInfo & table_expression_query_info,
PlannerContextPtr & planner_context)
{
const auto & query_context = planner_context->getQueryContext();
const auto & settings = query_context->getSettingsRef();
@ -688,7 +687,7 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(QueryTreeNodePtr table_expres
}
else
{
if (auto * distributed = dynamic_cast<StorageDistributed *>(storage.get());
if (auto * distributed = typeid_cast<StorageDistributed *>(storage.get());
distributed && canUseCustomKey(settings, *distributed->getCluster(), *query_context))
{
table_expression_query_info.use_custom_key = true;