Can you reproduce with an empty table? I can't reproduce it.
Also, can you paste the stack trace?
Yong

From: krishnanj...@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                                           

Reply via email to