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 6BD059FEA for ; Wed, 19 Dec 2012 01:14:15 +0000 (UTC) Received: (qmail 21403 invoked by uid 500); 19 Dec 2012 01:14:14 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 21357 invoked by uid 500); 19 Dec 2012 01:14:14 -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 21347 invoked by uid 500); 19 Dec 2012 01:14:14 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 21344 invoked by uid 99); 19 Dec 2012 01:14:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2012 01:14:14 +0000 Date: Wed, 19 Dec 2012 01:14:14 +0000 (UTC) From: "Mark Grover (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-2693) Add DECIMAL data type 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-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535532#comment-13535532 ] Mark Grover commented on HIVE-2693: ----------------------------------- That actually explains why where clauses aren't working because we are comparing BigDecimal with Double. I tried the same where clause but with a string and that worked: {code} SELECT * FROM DECIMAL_3 WHERE key='3.14'; 3.14 3 3.14 3 3.14 3 3.140 4 {code} So, here is the million dollar question. Our users (understandably so) are going to forget about the quotes. Even if we introduce a new literal as a part of this JIRA, they are going to forget about the literal. I can think of two options: 1. Somehow promote the double 3.14 to be a BigDecimal 3.14 (maintaining precision). Maybe via a double->string->BigDecimal? 2. Throw an error like you suggested. What do you think [~hagleitn]? > Add DECIMAL data type > --------------------- > > Key: HIVE-2693 > URL: https://issues.apache.org/jira/browse/HIVE-2693 > Project: Hive > Issue Type: New Feature > Components: Query Processor, Types > Affects Versions: 0.10.0 > Reporter: Carl Steinbach > Assignee: Prasad Mujumdar > Attachments: 2693_7.patch, 2693_8.patch, 2693_fix_all_tests1.patch, HIVE-2693-10.patch, HIVE-2693-11.patch, HIVE-2693-12-SortableSerDe.patch, HIVE-2693-13.patch, HIVE-2693-1.patch.txt, HIVE-2693-all.patch, HIVE-2693-fix.patch, HIVE-2693.patch, HIVE-2693-take3.patch, HIVE-2693-take4.patch > > > Add support for the DECIMAL data type. HIVE-2272 (TIMESTAMP) provides a nice template for how to do this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira