Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 125A410CD7 for ; Thu, 27 Feb 2014 12:45:21 +0000 (UTC) Received: (qmail 48961 invoked by uid 500); 27 Feb 2014 12:45:18 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 48222 invoked by uid 500); 27 Feb 2014 12:45:17 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 48214 invoked by uid 99); 27 Feb 2014 12:45:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Feb 2014 12:45:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of krishnanjrao@gmail.com designates 209.85.223.175 as permitted sender) Received: from [209.85.223.175] (HELO mail-ie0-f175.google.com) (209.85.223.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Feb 2014 12:45:09 +0000 Received: by mail-ie0-f175.google.com with SMTP id at1so1882707iec.6 for ; Thu, 27 Feb 2014 04:44:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=SBfDGRVtNZWzcLxETWNRVvOIov8bkIeuws0QmVHEmuY=; b=DZES4bk+oZTG1Sgpstz3VnN7N5zNqDz/+G2vHG9uTsPpGaW8APQiCDkAA1qhApOIYs LGcqzczjo8yg62DKye/hYiYC5u/8pXeVEjeiWngMR9wHFrplpV/22+OumdPBe8PGcOUV vASk/ig0/01aqI1gRk+RmgFvKcyEQd9OIGHmpbEQRTacFModtAq7eqfc5hxxnqM7HA8i WNlz845+pC4W2n57reW3oEj/89jvoNOkdV6q2AQ6Of4eqaM29eXNoC8n4bi3q+mG7xmD lnSb4BjoXId8DPwXW1huuHWNeAYmcS4sGzJ7BQgo4WOCMm+8Dae0LPhBdCWDy7BkY+9c 949Q== X-Received: by 10.50.22.210 with SMTP id g18mr32653623igf.19.1393505088928; Thu, 27 Feb 2014 04:44:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.96.67 with HTTP; Thu, 27 Feb 2014 04:44:28 -0800 (PST) From: Krishna Rao Date: Thu, 27 Feb 2014 12:44:28 +0000 Message-ID: Subject: Hive query parser bug resulting in "FAILED: NullPointerException null" To: user@hive.apache.org Content-Type: multipart/alternative; boundary=047d7bd752a8d17f6104f362af1c X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd752a8d17f6104f362af1c Content-Type: text/plain; charset=ISO-8859-1 Hi all, we've experienced a bug which seems to be caused by having a query constraint involving partitioned columns. The following query results in "FAILED: NullPointerException null" being returned nearly instantly: EXPLAIN SELECT col1 FROM tbl1 WHERE (part_col1 = 2014 AND part_col2 >= 2) OR part_col1 < 2014; The exception doesn't happen if any of the conditions are removed. The table is defined like the following: CREATE TABLE tbl1 ( col1 STRING, ... col12 STRING ) PARTITIONED BY (part_col1 INT, part_col2 TINYINT, part_col3 TINYINT) STORED AS SEQUENCEFILE; Unfortunately I cannot construct a test case to replicate this. Seen as though it appears to be a query parser bug, I thought the following would replicate it: CREATE TABLE tbl2 LIKE tbl1; EXPLAIN SELECT col1 FROM tbl2 WHERE (part_col1 = 2014 AND part_col2 >= 2) OR part_col1 < 2014; But it does not. Could it somehow be data specific? Does the query parser use partition information? Are there any logs I could see to investigate this further? Or is this a known bug? We're using hive 0.10.0-cdh4.4.0. Cheers, Krishna --047d7bd752a8d17f6104f362af1c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi all,

we've experienced a bug whi= ch seems to be caused by having a query constraint involving partitioned co= lumns. The following query results in "FAILED: NullPointerException nu= ll" being returned nearly instantly:

EXPLAIN SELECT
=A0 col1
FROM
=A0 tbl1
WHERE
(part_col1 =3D 2014 AND part_co= l2 >=3D 2)
OR=A0part_col1=A0< 2014;

The exception doesn't happen if any of the conditions are removed. The = table is defined like the following:

CREATE T= ABLE=A0tbl1=A0(
=A0=A0col1=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 STRING,
=A0 ...
=A0=A0col12=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0STRING
)
PARTITIONED BY (part_col1=A0INT,=A0= part_col2=A0TINYINT,=A0part_col3=A0TINYINT)
STORED AS SEQUENCEFIL= E;


Unfortunately I cannot construct a test case to replicate this. Seen a= s though it appears to be a query parser bug, I thought the following would= replicate it:

CREATE TABLE tbl2 LIKE tbl1;
EXPLA= IN SELECT
=A0 col1
FROM
=A0 tbl2
WH= ERE
(part_col1 =3D 2014 AND part_col2 >=3D 2)
OR=A0p= art_col1=A0< 2014;

But it does not. Could it somehow be data specifi= c? Does the query parser use partition information?

Are there any logs I could see to investigate this further? Or is this a = known bug?

We're using hive 0.10.0-cdh4.4.0.


Cheers,

Krishna
--047d7bd752a8d17f6104f362af1c--