[ 
https://issues.apache.org/jira/browse/HIVE-15680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15832171#comment-15832171
 ] 

Gopal V edited comment on HIVE-15680 at 1/20/17 5:51 PM:
---------------------------------------------------------

[~erwaman]: is this only happening for MRv2?

{code}
hive> -- This should return 2 records but only returns 1 record
hive> select * from test_table where number = 1
    > union all
    > select * from test_table where number = 2;
Query ID = gopal_20170120125021_ea181e13-828c-42e7-8070-6a09a715b694
Total jobs = 1
Launching Job 1 out of 1


----------------------------------------------------------------------------------------------
        VERTICES      MODE        STATUS  TOTAL  COMPLETED  RUNNING  PENDING  
FAILED  KILLED  
----------------------------------------------------------------------------------------------
Map 1 ..........      llap     SUCCEEDED      1          1        0        0    
   0       0
Map 3 ..........      llap     SUCCEEDED      1          1        0        0    
   0       0
----------------------------------------------------------------------------------------------
VERTICES: 02/02  [==========================>>] 100%  ELAPSED TIME: 0.16 s     
----------------------------------------------------------------------------------------------
Status: DAG finished successfully in 0.16 seconds

Query Execution Summary
----------------------------------------------------------------------------------------------
OPERATION                            DURATION
----------------------------------------------------------------------------------------------
Compile Query                           0.30s
Prepare Plan                            0.21s
Submit Plan                             0.27s
Start DAG                               0.00s
Run DAG                                 0.15s
----------------------------------------------------------------------------------------------

Task Execution Summary
----------------------------------------------------------------------------------------------
  VERTICES   DURATION(ms)  CPU_TIME(ms)  GC_TIME(ms)  INPUT_RECORDS  
OUTPUT_RECORDS
----------------------------------------------------------------------------------------------
     Map 1           0.00             0            0              1             
  0
     Map 3           0.00             0            0              1             
  0
----------------------------------------------------------------------------------------------

LLAP IO Summary
----------------------------------------------------------------------------------------------
  VERTICES ROWGROUPS  META_HIT  META_MISS  DATA_HIT  DATA_MISS  ALLOCATION     
USED  TOTAL_IO
----------------------------------------------------------------------------------------------
     Map 1         1         0          2        0B         6B    262.14KB      
 3B     0.03s
     Map 3         1         0          2        0B         6B    262.14KB      
 3B     0.03s
----------------------------------------------------------------------------------------------

FileSystem Counters Summary

Scheme: HDFS
----------------------------------------------------------------------------------------------
  VERTICES      BYTES_READ      READ_OPS     LARGE_READ_OPS      BYTES_WRITTEN  
   WRITE_OPS
----------------------------------------------------------------------------------------------
     Map 1            257B             6                  0               101B  
           2
     Map 3            257B             6                  0               101B  
           2
----------------------------------------------------------------------------------------------

Scheme: FILE
----------------------------------------------------------------------------------------------
  VERTICES      BYTES_READ      READ_OPS     LARGE_READ_OPS      BYTES_WRITTEN  
   WRITE_OPS
----------------------------------------------------------------------------------------------
     Map 1              0B             0                  0                 0B  
           0
     Map 3              0B             0                  0                 0B  
           0
----------------------------------------------------------------------------------------------

OK
1
2
Time taken: 1.038 seconds, Fetched: 2 row(s)
{code}


was (Author: gopalv):
[~erwaman]: is this only happening for MRv2?

> Incorrect results when hive.optimize.index.filter=true and same ORC table is 
> referenced twice in query
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-15680
>                 URL: https://issues.apache.org/jira/browse/HIVE-15680
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 2.2.0
>            Reporter: Anthony Hsu
>            Assignee: Anthony Hsu
>
> To repro:
> {noformat}
> set hive.optimize.index.filter=true;
> create table test_table(number int) stored as ORC;
> -- Two insertions will create two files, with one stripe each
> insert into table test_table VALUES (1);
> insert into table test_table VALUES (2);
> -- This should and does return 2 records
> select * from test_table;
> -- These should and do each return 1 record
> select * from test_table where number = 1;
> select * from test_table where number = 2;
> -- This should return 2 records but only returns 1 record
> select * from test_table where number = 1
> union all
> select * from test_table where number = 2;
> {noformat}
> What's happening is only the last predicate is being pushed down.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to