Hive, mail # user - Hive query parser bug resulting in "FAILED: NullPointerException null" - 2014-02-27, 12:45
 Search Hadoop and all its subprojects:

Switch to Threaded View
Copy link to this message
-
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

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB