Skip to content

Commit

Permalink
FLASH-612: Remove costly logging in dag (#308)
Browse files Browse the repository at this point in the history
* replace function `gethostbyname` with poco api

* Remove costly logging in dag expr analyzer
  • Loading branch information
zanmato1984 authored Nov 2, 2019
1 parent 712069b commit 9425bb6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ static String genFuncString(const String & func_name, const Names & argument_nam
}

DAGExpressionAnalyzer::DAGExpressionAnalyzer(std::vector<NameAndTypePair> && 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();
}
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<NameAndTypePair> && source_columns_, const Context & context_);
Expand Down

0 comments on commit 9425bb6

Please sign in to comment.