[
https://issues.apache.org/jira/browse/HIVE-11880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14948023#comment-14948023
]
WangMeng commented on HIVE-11880:
---------------------------------
[~jpullokkaran]
I have added Review Board in Issue Links.
The execution engine is MR( I don't use TEZ) .You can use
TPC-H(http://www.tpc.org/tpch/) to reproduce this Jira according to the
descriptition above. Thanks.
Different from HIVE-11919 , only when occurs "union type mismatch" and one
of the type mismatch column is constant and this type mismatch column is
filter column, then UNION ALL will throws HIVE-11880.
> filter bug of UNION ALL when hive.ppd.remove.duplicatefilters=true and
> filter condition is type incompatible column
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-11880
> URL: https://issues.apache.org/jira/browse/HIVE-11880
> Project: Hive
> Issue Type: Bug
> Components: Logical Optimizer
> Affects Versions: 1.2.1
> Reporter: WangMeng
> Assignee: WangMeng
> Attachments: HIVE-11880.01.patch, HIVE-11880.02.patch,
> HIVE-11880.03.patch, HIVE-11880.04.patch
>
>
> 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 :
> {code}
> 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 ;
> {code}
> When
> {code}
> set hive.ppd.remove.duplicatefilters=true
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)