You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Hive QA (JIRA)" <ji...@apache.org> on 2015/11/21 20:29:10 UTC

[jira] [Commented] (HIVE-12465) Hive might produce wrong results when (outer) joins are merged

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

Hive QA commented on HIVE-12465:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12773594/HIVE-12465.patch

{color:red}ERROR:{color} -1 due to build exiting with an error

Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/6094/testReport
Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/6094/console
Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-6094/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Tests exited with: NonZeroExitCodeException
Command 'bash /data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ [[ -n /usr/java/jdk1.7.0_45-cloudera ]]
+ export JAVA_HOME=/usr/java/jdk1.7.0_45-cloudera
+ JAVA_HOME=/usr/java/jdk1.7.0_45-cloudera
+ export PATH=/usr/java/jdk1.7.0_45-cloudera/bin/:/usr/java/jdk1.7.0_45-cloudera/bin:/usr/local/apache-maven-3.0.5/bin:/usr/local/apache-maven-3.0.5/bin:/usr/java/jdk1.7.0_45-cloudera/bin:/usr/local/apache-ant-1.9.1/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/hiveptest/bin
+ PATH=/usr/java/jdk1.7.0_45-cloudera/bin/:/usr/java/jdk1.7.0_45-cloudera/bin:/usr/local/apache-maven-3.0.5/bin:/usr/local/apache-maven-3.0.5/bin:/usr/java/jdk1.7.0_45-cloudera/bin:/usr/local/apache-ant-1.9.1/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/hiveptest/bin
+ export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
+ ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
+ export 'M2_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
+ M2_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
+ cd /data/hive-ptest/working/
+ tee /data/hive-ptest/logs/PreCommit-HIVE-TRUNK-Build-6094/source-prep.txt
+ [[ false == \t\r\u\e ]]
+ mkdir -p maven ivy
+ [[ git = \s\v\n ]]
+ [[ git = \g\i\t ]]
+ [[ -z master ]]
+ [[ -d apache-github-source-source ]]
+ [[ ! -d apache-github-source-source/.git ]]
+ [[ ! -d apache-github-source-source ]]
+ cd apache-github-source-source
+ git fetch origin
+ git reset --hard HEAD
HEAD is now at 8e9bae2 HIVE-12472: Add test case for HIVE-10592 (Prasanth Jayachandran reviewed by  Ashutosh Chauhan)
+ git clean -f -d
+ git checkout master
Already on 'master'
+ git reset --hard origin/master
HEAD is now at 8e9bae2 HIVE-12472: Add test case for HIVE-10592 (Prasanth Jayachandran reviewed by  Ashutosh Chauhan)
+ git merge --ff-only origin/master
Already up-to-date.
+ git gc
+ patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh
+ patchFilePath=/data/hive-ptest/working/scratch/build.patch
+ [[ -f /data/hive-ptest/working/scratch/build.patch ]]
+ chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh
+ /data/hive-ptest/working/scratch/smart-apply-patch.sh /data/hive-ptest/working/scratch/build.patch
The patch does not appear to apply with p0, p1, or p2
+ exit 1
'
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12773594 - PreCommit-HIVE-TRUNK-Build

> Hive might produce wrong results when (outer) joins are merged
> --------------------------------------------------------------
>
>                 Key: HIVE-12465
>                 URL: https://issues.apache.org/jira/browse/HIVE-12465
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.3.0, 2.0.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Blocker
>         Attachments: HIVE-12465.patch
>
>
> Consider the following query:
> {noformat}
> select * from
>   (select * from tab where tab.key = 0)a
> full outer join
>   (select * from tab_part where tab_part.key = 98)b
> join
>   tab_part c
> on a.key = b.key and b.key = c.key;
> {noformat}
> Hive should execute the full outer join operation (without ON clause) and then the join operation (ON a.key = b.key and b.key = c.key). Instead, it merges both joins, generating the following plan:
> {noformat}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-0 depends on stages: Stage-1
> STAGE PLANS:
>   Stage: Stage-1
>     Map Reduce
>       Map Operator Tree:
>           TableScan
>             alias: tab
>             filterExpr: (key = 0) (type: boolean)
>             Statistics: Num rows: 242 Data size: 22748 Basic stats: COMPLETE Column stats: NONE
>             Filter Operator
>               predicate: (key = 0) (type: boolean)
>               Statistics: Num rows: 121 Data size: 11374 Basic stats: COMPLETE Column stats: NONE
>               Select Operator
>                 expressions: 0 (type: int), value (type: string), ds (type: string)
>                 outputColumnNames: _col0, _col1, _col2
>                 Statistics: Num rows: 121 Data size: 11374 Basic stats: COMPLETE Column stats: NONE
>                 Reduce Output Operator
>                   key expressions: _col0 (type: int)
>                   sort order: +
>                   Map-reduce partition columns: _col0 (type: int)
>                   Statistics: Num rows: 121 Data size: 11374 Basic stats: COMPLETE Column stats: NONE
>                   value expressions: _col1 (type: string), _col2 (type: string)
>           TableScan
>             alias: tab_part
>             filterExpr: (key = 98) (type: boolean)
>             Statistics: Num rows: 500 Data size: 47000 Basic stats: COMPLETE Column stats: NONE
>             Filter Operator
>               predicate: (key = 98) (type: boolean)
>               Statistics: Num rows: 250 Data size: 23500 Basic stats: COMPLETE Column stats: NONE
>               Select Operator
>                 expressions: 98 (type: int), value (type: string), ds (type: string)
>                 outputColumnNames: _col0, _col1, _col2
>                 Statistics: Num rows: 250 Data size: 23500 Basic stats: COMPLETE Column stats: NONE
>                 Reduce Output Operator
>                   key expressions: _col0 (type: int)
>                   sort order: +
>                   Map-reduce partition columns: _col0 (type: int)
>                   Statistics: Num rows: 250 Data size: 23500 Basic stats: COMPLETE Column stats: NONE
>                   value expressions: _col1 (type: string), _col2 (type: string)
>           TableScan
>             alias: c
>             Statistics: Num rows: 500 Data size: 47000 Basic stats: COMPLETE Column stats: NONE
>             Reduce Output Operator
>               key expressions: key (type: int)
>               sort order: +
>               Map-reduce partition columns: key (type: int)
>               Statistics: Num rows: 500 Data size: 47000 Basic stats: COMPLETE Column stats: NONE
>               value expressions: value (type: string), ds (type: string)
>       Reduce Operator Tree:
>         Join Operator
>           condition map:
>                Outer Join 0 to 1
>                Inner Join 1 to 2
>           keys:
>             0 _col0 (type: int)
>             1 _col0 (type: int)
>             2 key (type: int)
>           outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8
>           Statistics: Num rows: 1100 Data size: 103400 Basic stats: COMPLETE Column stats: NONE
>           File Output Operator
>             compressed: false
>             Statistics: Num rows: 1100 Data size: 103400 Basic stats: COMPLETE Column stats: NONE
>             table:
>                 input format: org.apache.hadoop.mapred.TextInputFormat
>                 output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
>                 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
>   Stage: Stage-0
>     Fetch Operator
>       limit: -1
>       Processor Tree:
>         ListSink
> {noformat}
> That plan is equivalent to the following query, which is different than the original one:
> {noformat}
> select * from
>   (select * from tab where tab.key = 0)a
> full outer join
>   (select * from tab_part where tab_part.key = 98)b
> on a.key = b.key
> join
>   tab_part c
> on b.key = c.key;
> {noformat}
> It seems to be a problem in the recognition of join operations that can be merged into a single multijoin operator.



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