Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 53EF5107B8 for ; Wed, 6 Nov 2013 03:08:26 +0000 (UTC) Received: (qmail 47896 invoked by uid 500); 6 Nov 2013 03:08:20 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 47846 invoked by uid 500); 6 Nov 2013 03:08:19 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 47831 invoked by uid 500); 6 Nov 2013 03:08:18 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 47824 invoked by uid 99); 6 Nov 2013 03:08:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Nov 2013 03:08:17 +0000 Date: Wed, 6 Nov 2013 03:08:17 +0000 (UTC) From: "Xuefu Zhang (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-5726) The DecimalTypeInfo instance associated with a decimal constant is not in line with the precision/scale of the constant MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-5726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xuefu Zhang updated HIVE-5726: ------------------------------ Attachment: HIVE-5726.2.patch Patch #4 updated based on RB feedback. > The DecimalTypeInfo instance associated with a decimal constant is not in line with the precision/scale of the constant > ----------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-5726 > URL: https://issues.apache.org/jira/browse/HIVE-5726 > Project: Hive > Issue Type: Improvement > Reporter: Xuefu Zhang > Assignee: Xuefu Zhang > Attachments: HIVE-5726.1.patch, HIVE-5726.2.patch, HIVE-5726.patch > > > Currently Hive uses a default decimal type info instance to associate with a decimal constant in the expression tree. To precisely determine the precision/scale of the expression result requires more accurate precision/scale of the type of the decimal constant. Thus, Hive uses a precision/scale of the constant for the type info instance. As an example, the following is not desirable: > {code} > hive> create table mytable as select 3.14BD as t from person_age limit 1; > hive> desc mytable; > OK > t decimal(65,30) None > Time taken: 0.08 seconds, Fetched: 1 row(s) > {code} > instead, the precision/scale for t above should be (3, 2). -- This message was sent by Atlassian JIRA (v6.1#6144)