From d589864828ed31dcba034947375acf98a6897948 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 1 Feb 2023 18:12:13 +0000 Subject: [PATCH] Cleanup code --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 14 -------------- src/Planner/PlannerActionsVisitor.cpp | 3 --- src/Planner/PlannerExpressionAnalysis.cpp | 5 +---- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 4c1d6d309d6..003944fa8b0 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -447,9 +447,6 @@ public: alias_name_to_expressions[node_alias].push_back(node); } - if (const auto * function = node->as()) - 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()) - 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()->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()->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(); } } } diff --git a/src/Planner/PlannerActionsVisitor.cpp b/src/Planner/PlannerActionsVisitor.cpp index 13c88d47ca3..6bd245858fe 100644 --- a/src/Planner/PlannerActionsVisitor.cpp +++ b/src/Planner/PlannerActionsVisitor.cpp @@ -29,7 +29,6 @@ #include #include #include -#include 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(); Int64 actions_stack_size = static_cast(actions_stack.size() - 1); diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index 79feb501f37..99815d89168 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -1,6 +1,7 @@ #include #include +#include #include #include @@ -16,8 +17,6 @@ #include #include #include -#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;