drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5263) Prevent left NLJoin with non scalar subqueries
Date Tue, 21 Feb 2017 16:25:44 GMT

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

ASF GitHub Bot commented on DRILL-5263:
---------------------------------------

Github user Serhii-Harnyk commented on the issue:

    https://github.com/apache/drill/pull/748
  
    Merged into apace master without message _close apache/drill#748_. Closing PR manually.


> Prevent left NLJoin with non scalar subqueries
> ----------------------------------------------
>
>                 Key: DRILL-5263
>                 URL: https://issues.apache.org/jira/browse/DRILL-5263
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Serhii Harnyk
>            Assignee: Serhii Harnyk
>              Labels: ready-to-commit
>             Fix For: 1.10.0
>
>         Attachments: tmp.tar.gz
>
>
> Nested loop join operator in Drill supports only inner join and returns incorrect result
for queries with left join and non scalar sub-queries. Drill should throw error in this case.

> Example:
> {code:sql}
> alter session set planner.enable_nljoin_for_scalar_only=false;
> select t2.dt, t1.fyq, t2.who, t2.event
> from t2
> left join t1 on t2.dt between t1.dts and t1.dte
> order by t2.dt;
> {code}
> Result:
> {noformat}
> +-------------+----------+----------+--------------------+
> |     dt      |   fyq    |   who    |       event        |
> +-------------+----------+----------+--------------------+
> | 2016-12-26  | 2016-Q2  | aperson  | had chrsitmas      |
> | 2017-01-06  | 2016-Q3  | aperson  | did somthing       |
> | 2017-01-12  | 2016-Q3  | aperson  | did somthing else  |
> +-------------+----------+----------+--------------------+
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message