You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Krishna Rao <kr...@gmail.com> on 2014/02/27 13:44:28 UTC
Hive query parser bug resulting in "FAILED: NullPointerException null"
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
RE: Hive query parser bug resulting in "FAILED:
NullPointerException null"
Posted by java8964 <ja...@hotmail.com>.
Can you reproduce with an empty table? I can't reproduce it.
Also, can you paste the stack trace?
Yong
From: krishnanjrao@gmail.com
Date: Thu, 27 Feb 2014 12:44:28 +0000
Subject: Hive query parser bug resulting in "FAILED: NullPointerException null"
To: user@hive.apache.org
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 col1FROM tbl1WHERE(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 col1FROM tbl2WHERE(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