[ 
https://issues.apache.org/jira/browse/HIVE-27088?focusedWorklogId=861498&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-861498
 ]

ASF GitHub Bot logged work on HIVE-27088:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/May/23 11:31
            Start Date: 11/May/23 11:31
    Worklog Time Spent: 10m 
      Work Description: sonarcloud[bot] commented on PR #4070:
URL: https://github.com/apache/hive/pull/4070#issuecomment-1543829715

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=4070)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=4070&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=4070&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=4070&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=CODE_SMELL)
 [9 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=4070&resolved=false&types=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=4070&metric=coverage&view=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=4070&metric=duplicated_lines_density&view=list)
 No Duplication information
   
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 861498)
    Time Spent: 3h 40m  (was: 3.5h)

> Using MergeJoin and using filters does not work
> -----------------------------------------------
>
>                 Key: HIVE-27088
>                 URL: https://issues.apache.org/jira/browse/HIVE-27088
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>            Reporter: Ryu Kobayashi
>            Assignee: Ryu Kobayashi
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> When hive.merge.nway.joins is set to `true` and JOIN is performed with INNER 
> and OUTER and a filter exists, normal results cannot be obtained.
> For example:
> {code:java}
> -- Data preparation
> create temporary table foo (id bigint, code string) stored as orc;
> create temporary table bar (id bigint, code string) stored as orc;
> create temporary table baz (id bigint) stored as orc;
> INSERT INTO foo values
>   (29999000052073, '01'),
>   (29999000052107, '01'),
>   (29999000052111, '01'),
>   (29999000052112, '01'),
>   (29999000052113, '01'),
>   (29999000052114, '01'),
>   (29999000052071, '01A'),
>   (29999000052072, '01A'),
>   (29999000052116, '01A'),
>   (29999000052117, '01A'),
>   (29999000052118, '01A'),
>   (29999000052119, '01A'),
>   (29999000052120, '01A'),
>   (29999000052076, '06'),
>   (29999000052074, '06A'),
>   (29999000052075, '06A');INSERT INTO bar values
>   (29999000052071, '01'),
>   (29999000052072, '01'),
>   (29999000052073, '01'),
>   (29999000052116, '01'),
>   (29999000052117, '01'),
>   (29999000052071, '01A'),
>   (29999000052072, '01A'),
>   (29999000052073, '01A'),
>   (29999000052116, '01AS'),
>   (29999000052117, '01AS'),
>   (29999000052071, '01B'),
>   (29999000052072, '01B'),
>   (29999000052073, '01B'),
>   (29999000052116, '01BS'),
>   (29999000052117, '01BS'),
>   (29999000052071, '01C'),
>   (29999000052072, '01C'),
>   (29999000052073, '01C7'),
>   (29999000052116, '01CS'),
>   (29999000052117, '01CS'),
>   (29999000052071, '01D'),
>   (29999000052072, '01D'),
>   (29999000052073, '01D'),
>   (29999000052116, '01DS'),
>   (29999000052117, '01DS');INSERT INTO baz values
>   (29999000052071),
>   (29999000052072),
>   (29999000052073),
>   (29999000052074),
>   (29999000052075),
>   (29999000052076),
>   (29999000052107),
>   (29999000052111),
>   (29999000052112),
>   (29999000052113),
>   (29999000052114),
>   (29999000052116),
>   (29999000052117),
>   (29999000052118),
>   (29999000052119),
>   (29999000052120);{code}
> Normal works(set hive.merge.nway.joins=false):
> {code:java}
> hive> set hive.merge.nway.joins=false;
> hive> SELECT
>   a.id,
>   b.code,
>   c.id
> FROM bar AS a
> INNER JOIN foo AS b
> ON a.id = b.id
>   AND (a.code = '01AS' OR b.code = '01BS')
> LEFT OUTER JOIN baz AS c
> ON a.id = c.id;
> OK
> 29999000052116  01A     29999000052116
> 29999000052117  01A     29999000052117 {code}
> Abnormal works(set hive.merge.nway.joins=true):
> {code:java}
> hive> set hive.merge.nway.joins=true;
> hive> SELECT
>   a.id,
>   b.code,
>   c.id
> FROM bar AS a
> INNER JOIN foo AS b
> ON a.id = b.id
>   AND (a.code = '01AS' OR b.code = '01BS')
> LEFT OUTER JOIN baz AS c
> ON a.id = c.id;
> OK 29999000052071  01A     NULL
> 29999000052072  01A     NULL
> 29999000052073  01      NULL
> 29999000052116  01A     NULL
> 29999000052117  01A     NULL
> 29999000052071  01A     NULL
> 29999000052072  01A     NULL
> 29999000052073  01      NULL
> 29999000052116  01A     29999000052116
> 29999000052117  01A     29999000052117
> 29999000052071  01A     NULL
> 29999000052072  01A     NULL
> 29999000052073  01      NULL
> 29999000052116  01A     NULL
> 29999000052117  01A     NULL
> 29999000052071  01A     NULL
> 29999000052072  01A     NULL
> 29999000052073  01      NULL
> 29999000052116  01A     NULL
> 29999000052117  01A     NULL
> 29999000052071  01A     NULL
> 29999000052072  01A     NULL
> 29999000052073  01      NULL
> 29999000052116  01A     NULL
> 29999000052117  01A     NULL   {code}
>  
> I think this is also related to the next ticket: 
> https://issues.apache.org/jira/browse/HIVE-21322



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to