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 329A410978 for ; Thu, 19 Dec 2013 06:54:12 +0000 (UTC) Received: (qmail 90632 invoked by uid 500); 19 Dec 2013 06:54:09 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 90220 invoked by uid 500); 19 Dec 2013 06:54:09 -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 90210 invoked by uid 99); 19 Dec 2013 06:54:07 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Dec 2013 06:54:07 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 720761D3984; Thu, 19 Dec 2013 06:54:06 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1004843059125389738==" MIME-Version: 1.0 Subject: Re: Review Request 16329: HIVE-6039: Round, AVG and SUM functions reject char/varch input while accepting string input From: "Prasad Mujumdar" To: "Prasad Mujumdar" Cc: "Xuefu Zhang" , "hive" Date: Thu, 19 Dec 2013 06:54:06 -0000 Message-ID: <20131219065406.16721.95572@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Prasad Mujumdar" X-ReviewGroup: hive X-ReviewRequest-URL: https://reviews.apache.org/r/16329/ X-Sender: "Prasad Mujumdar" References: <20131217212659.27244.2832@reviews.apache.org> In-Reply-To: <20131217212659.27244.2832@reviews.apache.org> Reply-To: "Prasad Mujumdar" X-ReviewRequest-Repository: hive-git --===============1004843059125389738== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/16329/#review30678 ----------------------------------------------------------- The patch overall looks fine to. A minor suggestion below. I am wondering if the string value (string, char or varchar) is in the decimal format (scientific or non-scientific), the converting to double won't work. Do you think it's better to convert the string values to decimal in all these cases ? If not, it might be helpful to document that behavior. ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFRound.java I do agree that "Only numeric data types allowed" is a bit misleading since we do support string types as well .. - Prasad Mujumdar On Dec. 17, 2013, 9:26 p.m., Xuefu Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/16329/ > ----------------------------------------------------------- > > (Updated Dec. 17, 2013, 9:26 p.m.) > > > Review request for hive and Prasad Mujumdar. > > > Bugs: HIVE-6039 > https://issues.apache.org/jira/browse/HIVE-6039 > > > Repository: hive-git > > > Description > ------- > > Allow input to these UDFs for char and varchar. > > > Diffs > ----- > > data/files/char_varchar_udf.txt PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFAverage.java 4b219bd > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSum.java 41d5efd > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFRound.java fc9c1b2 > ql/src/test/queries/clientpositive/char_varchar_udf.q PRE-CREATION > ql/src/test/results/clientpositive/char_varchar_udf.q.out PRE-CREATION > > Diff: https://reviews.apache.org/r/16329/diff/ > > > Testing > ------- > > Unit tested. New test added. Test suite passed. > > > Thanks, > > Xuefu Zhang > > --===============1004843059125389738==--