[ https://issues.apache.org/jira/browse/HIVE-10792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14555545#comment-14555545 ]
Gopal V commented on HIVE-10792: -------------------------------- Are you sure this is related to ORC at all? {code} create temporary table test_txt (c0 int, c1 int) stored as textfile; insert into test_txt values (0, 1); select * from test_txt t1 union all select * from test_txt t2 where t2.c0 = 1; {code} returns the same. > PPD leads to wrong answer when mapper scans the same table with multiple > aliases > -------------------------------------------------------------------------------- > > Key: HIVE-10792 > URL: https://issues.apache.org/jira/browse/HIVE-10792 > Project: Hive > Issue Type: Bug > Components: File Formats, Query Processor > Affects Versions: 0.13.0, 0.14.0, 0.13.1, 1.0.0, 1.2.0, 1.1.0 > Reporter: Dayue Gao > Assignee: Dayue Gao > Priority: Critical > > Here's the steps to reproduce the bug. > First of all, prepare a simple ORC table with one row > {code} > create table test_orc (c0 int, c1 int) stored as ORC; > {code} > Table: test_orc > ||c0||c1|| > |0|1| > The following SQL gets empty result which is not expected > {code} > select * from test_orc t1 > union all > select * from test_orc t2 > where t2.c0 = 1 > {code} > Self join is also broken > {code} > set hive.auto.convert.join=false; -- force common join > select * from test_orc t1 > left outer join test_orc t2 on (t1.c0=t2.c0 and t2.c1=0); > {code} > It gets empty result while the expected answer is > ||t1.c0||t1.c1||t2.c0||t2.c1|| > |0|1|NULL|NULL| > In these cases, we pushdown predicates into OrcInputFormat. As a result, > TableScanOperator for "t1" can't receive its rows. -- This message was sent by Atlassian JIRA (v6.3.4#6332)