quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hakanmemiso...@apache.org
Subject [3/3] incubator-quickstep git commit: New type for fixed precision number: Decimal.
Date Thu, 23 Jun 2016 19:59:44 GMT
New type for fixed precision number: Decimal.


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/0dd7978b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/0dd7978b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/0dd7978b

Branch: refs/heads/decimal-type
Commit: 0dd7978bb22f917f8c99913133a312c9bf2a68c8
Parents: 4931623
Author: Hakan Memisoglu <hakanmemisoglu@apache.org>
Authored: Tue May 31 13:14:42 2016 -0500
Committer: Hakan Memisoglu <hakanmemisoglu@apache.org>
Committed: Thu Jun 23 14:58:46 2016 -0500

----------------------------------------------------------------------
 parser/SqlParser.ypp                            |    2 +-
 parser/preprocessed/SqlParser_gen.cpp           | 1060 +++++++++---------
 parser/preprocessed/SqlParser_gen.hpp           |    4 +-
 types/CMakeLists.txt                            |   27 +
 types/DecimalLit.hpp                            |  293 +++++
 types/DecimalType.cpp                           |  120 ++
 types/DecimalType.hpp                           |  124 ++
 types/NumericSuperType.hpp                      |    2 +-
 types/NumericTypeUnifier.hpp                    |   46 +
 types/Type.cpp                                  |    3 +
 types/Type.hpp                                  |    3 +
 types/Type.proto                                |    9 +-
 types/TypeFactory.cpp                           |   10 +
 types/TypeFactory.hpp                           |    1 +
 types/TypeID.cpp                                |    1 +
 types/TypeID.hpp                                |    1 +
 types/TypedValue.cpp                            |   16 +
 types/TypedValue.hpp                            |   21 +
 types/TypedValue.proto                          |    7 +-
 .../binary_operations/AddBinaryOperation.cpp    |   10 +-
 .../ArithmeticBinaryOperation.hpp               |   19 +
 .../ArithmeticBinaryOperators.hpp               |  106 ++
 .../operations/binary_operations/CMakeLists.txt |    2 +
 .../binary_operations/DivideBinaryOperation.cpp |    7 +-
 .../binary_operations/ModuloBinaryOperation.cpp |   13 +
 .../MultiplyBinaryOperation.cpp                 |   12 +-
 .../SubtractBinaryOperation.cpp                 |    9 +-
 .../operations/comparisons/BasicComparison.cpp  |    4 +-
 .../operations/comparisons/BasicComparison.hpp  |   22 +-
 types/operations/comparisons/CMakeLists.txt     |    1 +
 types/operations/comparisons/ComparisonUtil.hpp |  104 ++
 .../comparisons/LiteralComparators.hpp          |  127 +++
 .../ArithmeticUnaryOperations.cpp               |   13 +-
 .../operations/unary_operations/CMakeLists.txt  |    2 +
 .../unary_operations/NumericCastOperation.hpp   |    5 +-
 types/tests/DecimalType_unittest.cpp            |   82 ++
 36 files changed, 1733 insertions(+), 555 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/0dd7978b/parser/SqlParser.ypp
----------------------------------------------------------------------
diff --git a/parser/SqlParser.ypp b/parser/SqlParser.ypp
index b07c48e..eb2d0cf 100644
--- a/parser/SqlParser.ypp
+++ b/parser/SqlParser.ypp
@@ -730,7 +730,7 @@ data_type:
     $$ = new quickstep::ParseDataType(quickstep::TypeFactory::GetType(quickstep::kDatetime));
   }
   | TOKEN_DECIMAL {
-    $$ = new quickstep::ParseDataType(quickstep::TypeFactory::GetType(quickstep::kDouble));
+    $$ = new quickstep::ParseDataType(quickstep::TypeFactory::GetType(quickstep::kDecimal));
   }
   | TOKEN_REAL {
     $$ = new quickstep::ParseDataType(quickstep::TypeFactory::GetType(quickstep::kDouble));


Mime
View raw message