You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2015/01/16 02:04:00 UTC

[jira] [Commented] (DRILL-2019) Filter pushdown into the subquery when the subquery also has a filter is resulting in incorrect results

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

Rahul Challapalli commented on DRILL-2019:
------------------------------------------

The plan for the above query :
{code}
| 00-00    Screen
00-01      StreamAgg(group=[{}], EXPR$0=[COUNT()])
00-02        Project($f0=[0])
00-03          HashJoin(condition=[=($0, $1)], joinType=[inner])
00-05            Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=/tpch/lineitem.parquet]], selectionRoot=/tpch/lineitem.parquet, numFiles=1, columns=[`l_orderkey`]]])
00-04            Project(o_orderkey=[$1])
00-06              SelectionVectorRemover
00-07                Filter(condition=[>($0, 5)])
00-08                  Filter(condition=[<($0, 5)])
00-09                    Project(o_custkey=[$1], o_orderkey=[$0])
00-10                      Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=/tpch/orders.parquet]], selectionRoot=/tpch/orders.parquet, numFiles=1, columns=[`o_custkey`, `o_orderkey`]]])
 |
{code}

> Filter pushdown into the subquery when the subquery also has a filter is resulting in incorrect results
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-2019
>                 URL: https://issues.apache.org/jira/browse/DRILL-2019
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Operators, Query Planning & Optimization
>            Reporter: Rahul Challapalli
>            Assignee: Aman Sinha
>            Priority: Critical
>
> git.commit.id.abbrev=b491cdb
> The below query on top of tpch 0.01 data should actually return 0 records. (Verified with postgres). However drill returns incorrect result
> {code}
> select count(*) from cp.`tpch/lineitem.parquet` l inner join (select o.o_orderkey, o.o_custkey from cp.`tpch/orders.parquet` o where o.o_custkey < 5) s on l.l_orderkey = s.o_orderkey and s.o_custkey > 5;
> +------------+
> |   EXPR$0   |
> +------------+
> | 189        |
> +------------+
> {code}
> Marked as 'critical' since drill is reporting incorrect results



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)