From 89c64fe863141ed6c7b29db94a158c907bd27f75 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 24 Dec 2015 21:35:01 +0300 Subject: [PATCH] dbms: removed unused field [#METR-2944]. --- dbms/include/DB/Parsers/ASTLiteral.h | 2 -- dbms/src/Interpreters/LogicalExpressionsOptimizer.cpp | 2 +- dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dbms/include/DB/Parsers/ASTLiteral.h b/dbms/include/DB/Parsers/ASTLiteral.h index 852c193258d..c001cccaf5f 100644 --- a/dbms/include/DB/Parsers/ASTLiteral.h +++ b/dbms/include/DB/Parsers/ASTLiteral.h @@ -15,8 +15,6 @@ class ASTLiteral : public ASTWithAlias { public: Field value; - /// тип - DataTypePtr type; ASTLiteral() = default; ASTLiteral(const StringRange range_, const Field & value_) : ASTWithAlias(range_), value(value_) {} diff --git a/dbms/src/Interpreters/LogicalExpressionsOptimizer.cpp b/dbms/src/Interpreters/LogicalExpressionsOptimizer.cpp index 9da4c762e4f..e67c70638ef 100644 --- a/dbms/src/Interpreters/LogicalExpressionsOptimizer.cpp +++ b/dbms/src/Interpreters/LogicalExpressionsOptimizer.cpp @@ -173,7 +173,7 @@ bool LogicalExpressionsOptimizer::mayOptimizeDisjunctiveEqualityChain(const Disj auto & operands = getFunctionOperands(equality_functions[i]); auto literal = static_cast(&*operands[1]); - if (literal->type != first_literal->type) + if (literal->value.getType() != first_literal->value.getType()) return false; } return true; diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index 8e3519813b4..36813c87cc2 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -787,7 +787,6 @@ void MergeTreeDataSelectExecutor::createPositiveSignCondition(ExpressionActionsP sign->name = data.sign_column; sign->kind = ASTIdentifier::Column; - one->type = new DataTypeInt8; one->value = Field(static_cast(1)); out_expression = ExpressionAnalyzer(function_ptr, context, {}, data.getColumnsList()).getActions(false);