Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Hive query parser bug resulting in "FAILED: NullPointerException null"


Copy link to this message
-
Hive query parser bug resulting in "FAILED: NullPointerException null"
Krishna Rao 2014-02-27, 12:45
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