From f54f55bbdcb5b13c2d8cbcd82e4944714ef8e616 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Sep 2019 00:38:13 +0800 Subject: [PATCH] Add const. --- dbms/src/Interpreters/InterpreterSelectQuery.cpp | 2 +- dbms/src/Interpreters/InterpreterSelectQuery.h | 2 +- dbms/src/Interpreters/SyntaxAnalyzer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index ce1e57d24d7..80ca4f5f29b 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -689,7 +689,7 @@ InterpreterSelectQuery::analyzeExpressions( } -BlockInputStreamPtr InterpreterSelectQuery::createCheckNonEmptySetIfNeed(BlockInputStreamPtr stream, ExpressionActionsPtr expression) +BlockInputStreamPtr InterpreterSelectQuery::createCheckNonEmptySetIfNeed(BlockInputStreamPtr stream, const ExpressionActionsPtr & expression) const { for (const auto & action : expression->getActions()) { diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.h b/dbms/src/Interpreters/InterpreterSelectQuery.h index 490f13df59e..6efe85de725 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.h +++ b/dbms/src/Interpreters/InterpreterSelectQuery.h @@ -254,7 +254,7 @@ private: void initSettings(); /// Whether you need to check if the set is empty before ExpressionActions is executed. Create a CheckNonEmptySetBlockInputStream if needed. - BlockInputStreamPtr createCheckNonEmptySetIfNeed(BlockInputStreamPtr stream, ExpressionActionsPtr expression); + BlockInputStreamPtr createCheckNonEmptySetIfNeed(BlockInputStreamPtr stream, const ExpressionActionsPtr & expression) const; const SelectQueryOptions options; ASTPtr query_ptr; diff --git a/dbms/src/Interpreters/SyntaxAnalyzer.cpp b/dbms/src/Interpreters/SyntaxAnalyzer.cpp index 97b93d4eac4..43f2bcac76f 100644 --- a/dbms/src/Interpreters/SyntaxAnalyzer.cpp +++ b/dbms/src/Interpreters/SyntaxAnalyzer.cpp @@ -615,7 +615,7 @@ std::vector getAggregates(const ASTPtr & query) return {}; } -void collectCanShortCircuitSet(ASTPtr & ast, NameSet & need_check_empty_sets) +void collectCanShortCircuitSet(const ASTPtr & ast, NameSet & need_check_empty_sets) { if (const auto * function = ast->as()) {