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 B40C8200B31 for ; Tue, 24 May 2016 19:43:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B2A26160A35; Tue, 24 May 2016 17:43:54 +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 027E616098E for ; Tue, 24 May 2016 19:43:53 +0200 (CEST) Received: (qmail 32196 invoked by uid 500); 24 May 2016 17:43:53 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 32185 invoked by uid 99); 24 May 2016 17:43:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 May 2016 17:43:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8D3171A1388 for ; Tue, 24 May 2016 17:43:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id YlnNp0MsB3zj for ; Tue, 24 May 2016 17:43:50 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id C3C515FC0A for ; Tue, 24 May 2016 17:43:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u4OHhmYa016219; Tue, 24 May 2016 17:43:48 GMT Message-Id: <201605241743.u4OHhmYa016219@ip-10-146-233-104.ec2.internal> Date: Tue, 24 May 2016 17:43:48 +0000 From: "Dan Hecht (Code Review)" To: Taras Bobrovytsky , impala-cr@cloudera.com, dev@impala.incubator.apache.org Reply-To: dhecht@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?[Impala-CR](cdh5-2.6.0=5F5.8.0)_IMPALA-3163:_Fix_Decimal_to_Timestamp_casting=0A?= X-Gerrit-Change-Id: Iabeea9f4ab4880b2f814408add63c77916e2dba9 X-Gerrit-ChangeURL: X-Gerrit-Commit: 51f8080b93a7776804f435ee6dd124d6c46c02d9 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.10-rc0 archived-at: Tue, 24 May 2016 17:43:54 -0000 Dan Hecht has posted comments on this change. Change subject: IMPALA-3163: Fix Decimal to Timestamp casting ...................................................................... Patch Set 3: (2 comments) http://gerrit.cloudera.org:8080/#/c/3154/3/be/src/exprs/decimal-operators-ir.cc File be/src/exprs/decimal-operators-ir.cc: Line 583: whole_pt maybe rename this seconds, and rename fract_pt to nanoseconds, to make the constructor args clearer? Line 601: int128_t We don't have a TimestampValue(int128_t, int128_t) constructor. We know fract_pt value with be less than 64-bits, but whole_pt might not, so when passing to int64_t, it gets silently truncated. Please add a test case for when this truncation will happen (both positive and negative) and we probably need a check here. This may be one case where the range is different compared to the old double implementation (without this check). -- To view, visit http://gerrit.cloudera.org:8080/3154 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iabeea9f4ab4880b2f814408add63c77916e2dba9 Gerrit-PatchSet: 3 Gerrit-Project: Impala Gerrit-Branch: cdh5-2.6.0_5.8.0 Gerrit-Owner: Taras Bobrovytsky Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Taras Bobrovytsky Gerrit-HasComments: Yes