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 840D179D1 for ; Mon, 1 Aug 2011 14:32:28 +0000 (UTC) Received: (qmail 99276 invoked by uid 500); 1 Aug 2011 14:32:28 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 99105 invoked by uid 500); 1 Aug 2011 14:32:27 -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 99097 invoked by uid 99); 1 Aug 2011 14:32:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2011 14:32:27 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chinnarao@huawei.com designates 119.145.14.66 as permitted sender) Received: from [119.145.14.66] (HELO szxga03-in.huawei.com) (119.145.14.66) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2011 14:32:19 +0000 Received: from huawei.com (szxga03-in [172.24.2.9]) by szxga03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LP900MJ96WP5T@szxga03-in.huawei.com> for dev@hive.apache.org; Mon, 01 Aug 2011 22:29:13 +0800 (CST) Received: from huawei.com ([172.24.2.119]) by szxga03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LP900L7O6WP5A@szxga03-in.huawei.com> for dev@hive.apache.org; Mon, 01 Aug 2011 22:29:13 +0800 (CST) Received: from BLRNSHTIPL6NC ([10.18.1.36]) by szxml06-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPA id <0LP900KCP6WOSF@szxml06-in.huawei.com> for dev@hive.apache.org; Mon, 01 Aug 2011 22:29:13 +0800 (CST) Date: Mon, 01 Aug 2011 19:59:11 +0530 From: Chinna Subject: Query on retrieving data using smallint datatype To: dev@hive.apache.org Cc: subramanian@huawei.com, venugopalarao.kotha@huawei.com Reply-to: chinnarao@huawei.com Message-id: <7817A4783B024271818AB9677F1BF654@china.huawei.com> Organization: HTIPL MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.3790.4862 X-Mailer: Microsoft Office Outlook 11 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Thread-index: AcxQV2HCQ3F7bzlrSqCzYBQgEbyW2g== X-Virus-Checked: Checked by ClamAV on apache.org Hi, I have a query. I have execute the following statements 1. create table test(a smallint,b tinyint,c int,d bouble) row format delimeted fields terminated by'@'; 2. load data local inpath '/home/data/input.txt' into table test; 3. select a,b from test; But one of my Input data record is: 40000@300@10000@4000.00 This data record appeared due to a special scenario/bug in the application. So the values exceeded the given data type. The Output returned by Hive is : null, null Means, when the data size exceeds the data type range, Hive is returning NULL values. From code I can see this is explicitly implemented to do this way. Can any one explain why we choose to return NULL instead of this can we throw an exception or rotate the value Thanks&Regards, Chinna Rao Lalam