Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD72018B53 for ; Thu, 2 Jul 2015 18:33:04 +0000 (UTC) Received: (qmail 4005 invoked by uid 500); 2 Jul 2015 18:33:04 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 3976 invoked by uid 500); 2 Jul 2015 18:33:04 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 3966 invoked by uid 99); 2 Jul 2015 18:33:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2015 18:33:04 +0000 Date: Thu, 2 Jul 2015 18:33:04 +0000 (UTC) From: "Jinfeng Ni (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-3219) Filter is not pushed into subquery with window function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-3219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14612336#comment-14612336 ] Jinfeng Ni commented on DRILL-3219: ----------------------------------- The root cause of the this problem is similar to DRILL-3412. Basically, we do not have rules to push either Project or Filter through the Window operator. That's was caused the timing of when Drill breaks a project with window function into Project and Window operator ( currently, it just happened too early in the planning logic). > Filter is not pushed into subquery with window function > -------------------------------------------------------- > > Key: DRILL-3219 > URL: https://issues.apache.org/jira/browse/DRILL-3219 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.0.0 > Reporter: Victoria Markman > Assignee: Jinfeng Ni > Labels: window_function > Fix For: 1.2.0 > > > {code} > 0: jdbc:drill:schema=dfs> explain plan for select * from ( select a1, b1, c1, sum(a1) over(partition by b1) from t1 ) where c1 is not null; > +------+------+ > | text | json | > +------+------+ > | 00-00 Screen > 00-01 Project(a1=[$0], b1=[$1], c1=[$2], EXPR$3=[$3]) > 00-02 Project(a1=[$0], b1=[$1], c1=[$2], EXPR$3=[CASE(>($3, 0), CAST($4):ANY, null)]) > 00-03 SelectionVectorRemover > 00-04 Filter(condition=[IS NOT NULL($2)]) > 00-05 Window(window#0=[window(partition {1} order by [] range between UNBOUNDED PRECEDING and UNBOUNDED FOLLOWING aggs [COUNT($0), $SUM0($0)])]) > 00-06 SelectionVectorRemover > 00-07 Sort(sort0=[$1], dir0=[ASC]) > 00-08 Project(a1=[$2], b1=[$1], c1=[$0]) > 00-09 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:///drill/testdata/subqueries/t1]], selectionRoot=/drill/testdata/subqueries/t1, numFiles=1, columns=[`a1`, `b1`, `c1`]]]) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)