From 9425bb6587f3376ac3f61f569cfb99466ea29be3 Mon Sep 17 00:00:00 2001 From: ruoxi Date: Sat, 2 Nov 2019 21:01:30 +0800 Subject: [PATCH] FLASH-612: Remove costly logging in dag (#308) * replace function `gethostbyname` with poco api * Remove costly logging in dag expr analyzer --- dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp | 8 +------- dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp b/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp index 11b446656cb..ea7e943931e 100644 --- a/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp +++ b/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp @@ -48,11 +48,7 @@ static String genFuncString(const String & func_name, const Names & argument_nam } DAGExpressionAnalyzer::DAGExpressionAnalyzer(std::vector && source_columns_, const Context & context_) - : source_columns(std::move(source_columns_)), - context(context_), - after_agg(false), - implicit_cast_count(0), - log(&Logger::get("DAGExpressionAnalyzer")) + : source_columns(std::move(source_columns_)), context(context_), after_agg(false), implicit_cast_count(0) { settings = context.getSettings(); } @@ -391,8 +387,6 @@ String DAGExpressionAnalyzer::appendCastIfNeeded(const tipb::Expr & expr, Expres // todo ignore nullable info?? if (expected_type->getName() != actual_type->getName()) { - LOG_DEBUG( - log, __PRETTY_FUNCTION__ << " Add implicit cast: from " << actual_type->getName() << " to " << expected_type->getName()); implicit_cast_count++; // need to add cast function // first construct the second argument diff --git a/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h b/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h index e940ba164c6..70fdcfdfff0 100644 --- a/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h +++ b/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h @@ -34,7 +34,6 @@ class DAGExpressionAnalyzer : private boost::noncopyable const Context & context; bool after_agg; Int32 implicit_cast_count; - Poco::Logger * log; public: DAGExpressionAnalyzer(std::vector && source_columns_, const Context & context_);