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 7594E7C22 for ; Tue, 6 Sep 2011 17:41:19 +0000 (UTC) Received: (qmail 11087 invoked by uid 500); 6 Sep 2011 17:41:19 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 11018 invoked by uid 500); 6 Sep 2011 17:41:18 -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 11003 invoked by uid 99); 6 Sep 2011 17:41:18 -0000 Received: from reviews.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 17:41:18 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 5E1651C14FE; Tue, 6 Sep 2011 17:41:24 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1594894464816210401==" MIME-Version: 1.0 Subject: Re: Review Request: Warn user that precision is lost when bigint is implicitly cast to double in joins and unions. From: "Kevin Wilfong" To: "Siying Dong" Date: Tue, 06 Sep 2011 17:41:24 -0000 Message-ID: <20110906174124.2095.22923@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org X-ReviewRequest-URL: https://reviews.apache.org/r/1705/ Cc: "Kevin Wilfong" ,"hive" In-Reply-To: <20110902165647.11681.68946@reviews.apache.org> References: <20110902165647.11681.68946@reviews.apache.org> --===============1594894464816210401== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1705/ ----------------------------------------------------------- (Updated 2011-09-06 17:41:24.308161) Review request for hive and Siying Dong. Changes ------- Added the new property to hive-default.xml Summary ------- I added checks before the type conversions for both joins and unions to eit= her throw an error or a warning depending if a bigint was going to be conve= rted to a double. I also added a new variable hive.mapred.bigint.comparison.mode, which is se= t to either strict or nonstrict to indicate whether an error or a warning s= hould be given when a bigint is converted to a double. This is instead of = the original implementation which used the variable hive.mapred.mode. This addresses bug HIVE-2427. https://issues.apache.org/jira/browse/HIVE-2427 Diffs (updated) ----- trunk/ql/src/test/results/clientnegative/compare_string_bigint_union.q.ou= t PRE-CREATION = trunk/ql/src/test/results/clientpositive/filter_join_breaktask2.q.out 116= 4293 = trunk/ql/src/test/results/clientnegative/compare_double_bigint_union.q.ou= t PRE-CREATION = trunk/ql/src/test/results/clientnegative/compare_string_bigint.q.out 1164= 293 = trunk/ql/src/test/results/clientnegative/compare_string_bigint_join.q.out= PRE-CREATION = trunk/ql/src/test/queries/clientpositive/filter_join_breaktask2.q 1164293 = trunk/ql/src/test/results/clientnegative/compare_double_bigint.q.out 1164= 293 = trunk/ql/src/test/results/clientnegative/compare_double_bigint_join.q.out= PRE-CREATION = trunk/ql/src/test/queries/clientnegative/compare_double_bigint_union.q PR= E-CREATION = trunk/ql/src/test/queries/clientnegative/compare_string_bigint.q 1164293 = trunk/ql/src/test/queries/clientnegative/compare_string_bigint_join.q PRE= -CREATION = trunk/ql/src/test/queries/clientnegative/compare_string_bigint_union.q PR= E-CREATION = trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.= java 1164293 = trunk/ql/src/test/queries/clientnegative/compare_double_bigint.q 1164293 = trunk/ql/src/test/queries/clientnegative/compare_double_bigint_join.q PRE= -CREATION = trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 1164293 = trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 1= 164293 = trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 1164293 = trunk/conf/hive-default.xml 1164293 = Diff: https://reviews.apache.org/r/1705/diff Testing ------- I added several more tests to demonstrate the errors. I also modified a unit test in which a join was being done which involved a= comparison between a string and a bigint. I set hive.mapred.bigint.compar= ison.mode to nonstrict, so the only change was the new warning appeared in = the output. Thanks, Kevin --===============1594894464816210401==--