Cleanup code

This commit is contained in:
Dmitry Novik 2023-02-01 18:12:13 +00:00
parent 7e40ab7658
commit d589864828
3 changed files with 1 additions and 21 deletions

View File

@ -447,9 +447,6 @@ public:
alias_name_to_expressions[node_alias].push_back(node);
}
if (const auto * function = node->as<FunctionNode>())
LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Pushed function {} on stack", function->getFunctionName());
expressions.emplace_back(node);
}
@ -468,9 +465,6 @@ public:
alias_name_to_expressions.erase(it);
}
if (const auto * function = top_expression->as<FunctionNode>())
LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Poped function {} on stack", function->getFunctionName());
expressions.pop_back();
}
@ -500,7 +494,6 @@ public:
if (factory.isAggregateFunctionName(function->getFunctionName()))
return true;
LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Function {} is being resolved, but is not aggregate", function->getFunctionName());
}
return false;
}
@ -6071,11 +6064,6 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier
for (const auto & group_by_elem : grouping_set->as<ListNode>()->getNodes())
scope.nullable_group_by_keys.insert(group_by_elem->clone());
}
// for (const auto & grouping_set : query_node_typed.getGroupBy().getNodes())
// {
// for (const auto & group_by_elem : grouping_set->as<ListNode>()->getNodes())
// group_by_elem->convertToNullable();
// }
}
else
{
@ -6088,8 +6076,6 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier
{
for (const auto & group_by_elem : query_node_typed.getGroupBy().getNodes())
scope.nullable_group_by_keys.insert(group_by_elem->clone());
// for (const auto & group_by_elem : query_node_typed.getGroupBy().getNodes())
// group_by_elem->convertToNullable();
}
}
}

View File

@ -29,7 +29,6 @@
#include <Planner/PlannerContext.h>
#include <Planner/TableExpressionData.h>
#include <Planner/Utils.h>
#include <Poco/Logger.h>
namespace DB
{
@ -83,7 +82,6 @@ public:
node_name,
actions_dag->dumpNames());
LOG_DEBUG(&Poco::Logger::get("ActionsScopeNode"), "Node: {} {}", it->second->result_name, it->second->result_type->getName());
return it->second;
}
@ -227,7 +225,6 @@ PlannerActionsVisitorImpl::NodeNameAndNodeMinLevel PlannerActionsVisitorImpl::vi
PlannerActionsVisitorImpl::NodeNameAndNodeMinLevel PlannerActionsVisitorImpl::visitColumn(const QueryTreeNodePtr & node)
{
auto column_node_name = calculateActionNodeName(node, *planner_context, node_to_node_name);
LOG_DEBUG(&Poco::Logger::get("PlannerActionsVisitorImpl"), "Processing column with name: {}", column_node_name);
const auto & column_node = node->as<ColumnNode &>();
Int64 actions_stack_size = static_cast<Int64>(actions_stack.size() - 1);

View File

@ -1,6 +1,7 @@
#include <Planner/PlannerExpressionAnalysis.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeNullable.h>
#include <Analyzer/FunctionNode.h>
#include <Analyzer/ConstantNode.h>
@ -16,8 +17,6 @@
#include <Planner/PlannerAggregation.h>
#include <Planner/PlannerWindowFunctions.h>
#include <Planner/Utils.h>
#include "Common/tests/gtest_global_context.h"
#include "DataTypes/DataTypeNullable.h"
namespace DB
{
@ -303,7 +302,6 @@ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node,
ActionsChain & actions_chain)
{
const auto & projection_input = current_output_columns;
LOG_DEBUG(&Poco::Logger::get("PlannerExpressionAnalysis"), "Projection node: {}", query_node.getProjectionNode()->dumpTree());
auto projection_actions = buildActionsDAGFromExpressionNode(query_node.getProjectionNode(), projection_input, planner_context);
auto projection_columns = query_node.getProjectionColumns();
@ -325,7 +323,6 @@ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node,
for (size_t i = 0; i < projection_outputs_size; ++i)
{
auto & projection_column = projection_columns[i];
LOG_DEBUG(&Poco::Logger::get("PlannerExpressionAnalysis"), "Projection column {}: {} {}", i, projection_column.name, projection_column.type->getName());
const auto * projection_node = projection_actions_outputs[i];
const auto & projection_node_name = projection_node->result_name;