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 EB5AB188B6 for ; Wed, 16 Sep 2015 20:40:46 +0000 (UTC) Received: (qmail 75022 invoked by uid 500); 16 Sep 2015 20:40:46 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 74993 invoked by uid 500); 16 Sep 2015 20:40:46 -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 74983 invoked by uid 99); 16 Sep 2015 20:40:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2015 20:40:46 +0000 Date: Wed, 16 Sep 2015 20:40:46 +0000 (UTC) From: "Victoria Markman (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (DRILL-3238) Cannot Plan Exception is raised when the same window partition is defined in select & window clauses 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-3238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Victoria Markman closed DRILL-3238. ----------------------------------- > Cannot Plan Exception is raised when the same window partition is defined in select & window clauses > ---------------------------------------------------------------------------------------------------- > > Key: DRILL-3238 > URL: https://issues.apache.org/jira/browse/DRILL-3238 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Reporter: Sean Hsuan-Yi Chu > Assignee: Sean Hsuan-Yi Chu > Labels: window_function > Fix For: 1.2.0 > > > While this works: > {code} > select sum(a2) over(partition by a2 order by a2), count(*) over(partition by a2 order by a2) > from t > {code} > , this fails > {code} > select sum(a2) over(w), count(*) over(partition by a2 order by a2) > from t > window w as (partition by a2 order by a2) > {code} > Notice these two queries are logically the same thing if we plug-in the window definition back into the SELECT-CLAUSE in the 2nd query. -- This message was sent by Atlassian JIRA (v6.3.4#6332)