hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "meng wang" <>
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:

Review request for hive.

Bugs: HIVE-11880

Repository: hive-git


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` ,
              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.


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




meng wang

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