[ 
https://issues.apache.org/jira/browse/DRILL-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jinfeng Ni updated DRILL-467:
-----------------------------

    Attachment: DRILL-467.1.patch

This patch will support multiple "and" join conditions in merge join operator. 

> Merge join should support multipe "and" join conditions 
> --------------------------------------------------------
>
>                 Key: DRILL-467
>                 URL: https://issues.apache.org/jira/browse/DRILL-467
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Jinfeng Ni
>            Assignee: Jinfeng Ni
>         Attachments: DRILL-467.1.patch
>
>
> The current MergeJoin operator only supports one single join condition.  For 
> instance, for the following query:
> "select l.l_partkey, l.l_suppkey, ps.ps_partkey, ps.ps_suppkey "
>         + " from cp.`tpch/lineitem.parquet` l join "
>         + "      cp.`tpch/partsupp.parquet` ps"
>         + " on l.l_partkey = ps.ps_partkey and "
>         + "    l.l_suppkey = ps.ps_suppkey"
> The join conditions are specified by an "and" compound predicates.  If we run 
> the above query on Drill today,  we will see two behaviors:
> 1) if assertion is enabled ( -ea option is specified for java ), then Drill 
> will throw assertion error, complaining it can support only single join 
> condition.
> 2) if assertion is not enabled, the query will run through. However, only the 
> first join condition l.l_partkey = ps.ps_partkey is checked. Therefore, the 
> result is not correct.
> We should enhance the current MergeJoin operator to support multiple "and" 
> join conditions. 
> Some TPCH queries also require to support multiple join conditions.
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to