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

Aman Sinha commented on DRILL-7391:
-----------------------------------

[~volodymyr], I assume this fix would go into 1.17 since it is a wrong result.  
Since I will be offline for a few days, I am assigning this to you for updating 
the pom.xml file for Calcite version once CALCITE-3390 is merged and also 
adding the following unit test to TestExampleQueries.java:
{noformat}

  @Test  // DRILL-7391
  public void testItemPushdownPastLeftOuterJoin() throws Exception {
    String query = "select t1.columns[0] as a, t2.columns[0] as b from 
cp.`store/text/data/regions.csv` t1 "
            + " left outer join cp.`store/text/data/regions.csv` t2 on 
t1.columns[0] = t2.columns[0]";

    PlanTestBase.testPlanMatchingPatterns(query,
            new String[] {},
            // exclude pattern where Project is projecting the 'columns' field
            new String[]{"Project.*columns"});

  }
{noformat}

> Wrong result when doing left outer join on CSV table
> ----------------------------------------------------
>
>                 Key: DRILL-7391
>                 URL: https://issues.apache.org/jira/browse/DRILL-7391
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.16.0
>            Reporter: Aman Sinha
>            Assignee: Aman Sinha
>            Priority: Major
>             Fix For: 1.17.0
>
>         Attachments: tt5.tar.gz, tt6.tar.gz
>
>
> The following query shows 1 row that is incorrect.  For the non-null rows, 
> both columns should have the same value.  This is on CSV sample data (I will 
> attach the files). 
> {noformat}
> apache drill (dfs.tmp)> select tt5.columns[0], tt6.columns[0] from tt5 left 
> outer join tt6  on tt5.columns[0] = tt6.columns[0];
> +--------+--------+
> | EXPR$0 | EXPR$1 |
> +--------+--------+
> | 455    | null   |
> | 455    | null   |
> | 555    | null   |
> | 1414   | 1414   |
> | 455    | null   |
> | 580    | null   |
> | 1111   | null   |
> | 555    | null   |
> | 455    | null   |
> | 455    | null   |
> | 455    | null   |
> | 455    | null   |
> | 455    | null   |
> | 555    | null   |
> | 455    | null   |
> | 455    | null   |
> | 455    | null   |
> | 580    | null   |
> | 6767   | null   |
> | 455    | null   |
> | 555    | null   |
> | 455    | null   |
> | 555    | null   |
> | 555    | null   |
> | 555    | null   |
> | 455    | null   |
> | 555    | null   |
> | 455    | null   |
> | 455    | null   |
> | 455    | null   |
> | 6767   | null   |
> | 555    | null   |
> | 555    | null   |
> | 455    | null   |
> | 555    | null   |
> | 555    | null   |
> | 1414   | 1414   |
> | 455    | null   |
> | 555    | null   |
> | 555    | null   |
> | 455    | null   |
> | 455    | null   |
> | 555    | null   |
> | 455    | null   |
> | 555    | null   |
> | 555    | null   |
> | 455    | null   |
> | 455    | null   |
> | 9669   | 1414   |          <--- Wrong result
> | 555    | null   |
> | 455    | null   |
> | 455    | null   |
> | 455    | null   |
> | 555    | null   |
> | 580    | null   |
> | 455    | null   |
> | 555    | null   |
> | 455    | null   |
> | 555    | null   |
> | 455    | null   |
> | 455    | null   |
> | 409    | null   |
> | 455    | null   |
> | 555    | null   |
> | 555    | null   |
> | 455    | null   |
> | 455    | null   |
> | 555    | null   |
> | 455    | null   |
> | 555    | null   |
> | 1414   | 1414   |
> | 455    | null   |
> | 555    | null   |
> | 555    | null   |
> | 555    | null   |
> +--------+--------+
> 75 rows selected 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to