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

Jacques Nadeau resolved DRILL-404.
----------------------------------

    Resolution: Fixed
      Assignee: Jacques Nadeau

Fixed in recent commits.

> Wrong result for boolean operations that have more than 2 inputs
> ----------------------------------------------------------------
>
>                 Key: DRILL-404
>                 URL: https://issues.apache.org/jira/browse/DRILL-404
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Aman Sinha
>            Assignee: Jacques Nadeau
>
> See query below which has and AND of 3 range predicates.  It looks like drill 
> is only processing the first 2 predicates and ignoring the N_NATIONKEY < 2 
> predicate.   The explain plan also shows the problem. 
> select N_REGIONKEY, N_NATIONKEY from dfs.`/tmp/parquet/nation.parquet` where 
> N_REGIONKEY < 2 and N_NATIONKEY > 0 and N_NATIONKEY < 2;
> +-------------+-------------+
> | N_REGIONKEY | N_NATIONKEY |
> +-------------+-------------+
> | 1           | 1           |
> | 1           | 2           |
> | 1           | 3           |
> | 0           | 5           |
> | 0           | 14          |
> | 0           | 15          |
> | 0           | 16          |
> | 1           | 17          |
> | 1           | 24          |
> +-------------+-------------+
> 9 rows selected (0.14 seconds)
> 0: jdbc:drill:zk=local> explain plan for select N_REGIONKEY, N_NATIONKEY from 
> dfs.`/tmp/parquet/nation.parquet` where N_REGIONKEY < 2 and N_NATIONKEY > 0 
> and N_NATIONKEY < 2;
> +------------+
> |  physical  |
> +------------+
> | {
>   "head" : {
>     "version" : 1,
>     "generator" : {
>       "type" : "org.apache.drill.exec.planner.logical.DrillImplementor",
>       "info" : ""
>     },
>     "type" : "APACHE_DRILL_PHYSICAL",
>     "resultMode" : "EXEC"
>   },
>   "graph" : [ {
>     "pop" : "parquet-scan",
>     "@id" : 1,
>     "entries" : [ {
>       "path" : "file:/tmp/parquet/nation.parquet"
>     } ],
>     "storageengine" : {
>       "type" : "parquet"
>     }
>   }, {
>     "pop" : "filter",
>     "@id" : 2,
>     "child" : 1,
>     "expr" : " ( (N_REGIONKEY)  < (2) )  and ( (N_NATIONKEY)  > (0) ) "
>   }, {
>     "pop" : "selection-vector-remover",
>     "@id" : 3,
>     "child" : 2
>   }, {



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

Reply via email to