From 71b410eb1095a5c5f83b281aaec733b336c40f17 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 6 Jul 2020 05:11:33 +0300 Subject: [PATCH] Remove unused potentially dangerous function --- src/Parsers/makeASTForLogicalFunction.cpp | 16 +--------------- src/Parsers/makeASTForLogicalFunction.h | 3 --- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/Parsers/makeASTForLogicalFunction.cpp b/src/Parsers/makeASTForLogicalFunction.cpp index eaae38740aa..02c9da926c9 100644 --- a/src/Parsers/makeASTForLogicalFunction.cpp +++ b/src/Parsers/makeASTForLogicalFunction.cpp @@ -7,21 +7,6 @@ namespace DB { -ASTPtr makeASTForLogicalNot(ASTPtr argument) -{ - bool b; - if (tryGetLiteralBool(argument.get(), b)) - return std::make_shared(Field{UInt8(!b)}); - - auto function = std::make_shared(); - auto exp_list = std::make_shared(); - function->name = "not"; - function->arguments = exp_list; - function->children.push_back(exp_list); - exp_list->children.push_back(argument); - return function; -} - ASTPtr makeASTForLogicalAnd(ASTs && arguments) { @@ -100,4 +85,5 @@ bool tryGetLiteralBool(const IAST * ast, bool & value) return false; } } + } diff --git a/src/Parsers/makeASTForLogicalFunction.h b/src/Parsers/makeASTForLogicalFunction.h index 5c1096cab6e..8c3718bfcde 100644 --- a/src/Parsers/makeASTForLogicalFunction.h +++ b/src/Parsers/makeASTForLogicalFunction.h @@ -5,9 +5,6 @@ namespace DB { -/// Makes an AST calculating NOT argument. -ASTPtr makeASTForLogicalNot(ASTPtr argument); - /// Makes an AST calculating argument1 AND argument2 AND ... AND argumentN. ASTPtr makeASTForLogicalAnd(ASTs && arguments);