Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 54F96200B32 for ; Thu, 23 Jun 2016 21:59:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 53A2B160A59; Thu, 23 Jun 2016 19:59:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9B146160A35 for ; Thu, 23 Jun 2016 21:59:46 +0200 (CEST) Received: (qmail 41233 invoked by uid 500); 23 Jun 2016 19:59:45 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 41223 invoked by uid 99); 23 Jun 2016 19:59:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2016 19:59:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 14CD918128E for ; Thu, 23 Jun 2016 19:59:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id HSOlefPJtNVn for ; Thu, 23 Jun 2016 19:59:44 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id B0B6160CDB for ; Thu, 23 Jun 2016 19:59:43 +0000 (UTC) Received: (qmail 41220 invoked by uid 99); 23 Jun 2016 19:59:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2016 19:59:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D4A78E38B1; Thu, 23 Jun 2016 19:59:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hakanmemisoglu@apache.org To: commits@quickstep.incubator.apache.org Date: Thu, 23 Jun 2016 19:59:44 -0000 Message-Id: <136519abf25e4b79a0f155ee00d33a34@git.apache.org> In-Reply-To: <07716c4ec67a4bc4b1ceeafd4f90a30d@git.apache.org> References: <07716c4ec67a4bc4b1ceeafd4f90a30d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/3] incubator-quickstep git commit: New type for fixed precision number: Decimal. archived-at: Thu, 23 Jun 2016 19:59:47 -0000 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 Authored: Tue May 31 13:14:42 2016 -0500 Committer: Hakan Memisoglu 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));