Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 608C417621 for ; Mon, 14 Sep 2015 00:55:46 +0000 (UTC) Received: (qmail 40041 invoked by uid 500); 14 Sep 2015 00:55:46 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 40016 invoked by uid 500); 14 Sep 2015 00:55:46 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 40004 invoked by uid 99); 14 Sep 2015 00:55:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2015 00:55:46 +0000 Date: Mon, 14 Sep 2015 00:55:46 +0000 (UTC) From: "Carl Steinbach (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-11802) Float-point numbers are displayed with different precision in Beeline/JDBC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-11802?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1474= 2769#comment-14742769 ]=20 Carl Steinbach commented on HIVE-11802: --------------------------------------- Thanks for adding a test. Here's some feedback: * TestColumn is missing an ASF header. * TestColumn doesn't prove that beeline returns correct results. What we ne= ed is an end-to-end test that validates the output of beeline. There's an e= xisting test driver (TestBeeLineDriver) that was included in the original H= iveServer2 patch. The goal was to make it easy to write end-to-end Beeline = tests in the style of the existing qfile tests. There's also a set of sampl= e data files in files/types/primitives that cover all primitive types, and = an initialization file (data/scripts/q_test_init.sql) that creates a 'primi= tives' table on top of it. I think we'd get more complete and easier to mai= ntain test coverage with less code by resurrecting TestBeeLineDriver and wr= iting a new beeline qfile test that runs a 'SELECT *' query against the pri= mitives table. I suspect the original HS2 patch even had a qfile test for t= his, but I'm too depressed to look. It would be awesome if you want to fix = this, but all that really stands in the way of a +1 is adding the missing A= SF header. > Float-point numbers are displayed with different precision in Beeline/JDB= C > -------------------------------------------------------------------------= - > > Key: HIVE-11802 > URL: https://issues.apache.org/jira/browse/HIVE-11802 > Project: Hive > Issue Type: Bug > Affects Versions: 1.2.1 > Reporter: Sergio Pe=C3=B1a > Assignee: Sergio Pe=C3=B1a > Attachments: HIVE-11802.2.patch > > > When inserting float-point numbers to a table, the values displayed on be= eline or jdbc are with different precision. > How to reproduce: > {noformat} > 0: jdbc:hive2://localhost:10000> create table decimals (f float, af array= , d double, ad array) stored as parquet; > No rows affected (0.294 seconds) > 0: jdbc:hive2://localhost:10000> insert into table decimals select 1.1005= 8, array(cast(1.10058 as float)), 2.0133, array(2.0133) from dummy limit 1; > ... > No rows affected (20.089 seconds) > 0: jdbc:hive2://localhost:10000> select f, af, af[0], d, ad[0] from decim= als; > +---------------------+------------+---------------------+---------+-----= ----+--+ > | f | af | _c2 | d | _c= 4 | > +---------------------+------------+---------------------+---------+-----= ----+--+ > | 1.1005799770355225 | [1.10058] | 1.1005799770355225 | 2.0133 | 2.01= 33 | > +---------------------+------------+---------------------+---------+-----= ----+--+ > {noformat} > When displaying arrays, the values are displayed correctly, but if I prin= t a specific element, it is then displayed with more decimal positions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)