hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "meng wang" <mengw...@qiyi.com>
Subject Review Request 38805: HIVE-11880 filter bug of UNION ALL when hive.ppd.remove.duplicatefilters=true and filter condition is type incompatible column.
Date Tue, 29 Sep 2015 11:25:21 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38805/
-----------------------------------------------------------

Review request for hive.


Bugs: HIVE-11880
    https://issues.apache.org/jira/browse/HIVE-11880


Repository: hive-git


Description
-------

For UNION ALL , when an union operator is constant column (such as '0L', BIGINT Type) and
its corresponding column has incompatible type (such as INT type).
Query with filter condition on type incompatible column on this UNION ALL will cause IndexOutOfBoundsException.

Such as TPC-H table "orders",in the following query:
Type of 'orders'.'o_custkey' is INT normally, while the type of corresponding constant column
"0" is BIGINT( `0L AS `o_custkey` ).
This query (with filter "type incompatible column 'o_custkey' ") will fail with java.lang.IndexOutOfBoundsException
:
//
SELECT Count(1)
FROM   (
              SELECT `o_orderkey` ,
                     `o_custkey`
              FROM   `orders`
              UNION ALL
              SELECT `o_orderkey`,
                     0L  AS `o_custkey`
              FROM   `orders`) `oo`
WHERE  o_custkey<100000 limit 4 ;
//

when set hive.ppd.remove.duplicatefilters=true.


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java c5f39d3 
  ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java dbd021b 

Diff: https://reviews.apache.org/r/38805/diff/


Testing
-------


Thanks,

meng wang


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message