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 72673173AE for ; Thu, 4 Jun 2015 22:51:38 +0000 (UTC) Received: (qmail 24751 invoked by uid 500); 4 Jun 2015 22:51:38 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 24723 invoked by uid 500); 4 Jun 2015 22:51:38 -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 24713 invoked by uid 99); 4 Jun 2015 22:51:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2015 22:51:38 +0000 Date: Thu, 4 Jun 2015 22:51:38 +0000 (UTC) From: "Deneche A. Hakim (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-3243) Need a better error message - Use of alias in window function definition 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-3243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Deneche A. Hakim updated DRILL-3243: ------------------------------------ Priority: Minor (was: Major) > Need a better error message - Use of alias in window function definition > ------------------------------------------------------------------------ > > Key: DRILL-3243 > URL: https://issues.apache.org/jira/browse/DRILL-3243 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Flow > Affects Versions: 1.0.0 > Reporter: Khurram Faraaz > Assignee: Deneche A. Hakim > Priority: Minor > Fix For: 1.1.0 > > > Need a better error message when we use alias for window definition in query that uses window functions. for example, OVER(PARTITION BY columns[0] ORDER BY columns[1]) tmp, and if alias "tmp" is used in the predicate we need a message that says, column "tmp" does not exist, that is how it is in Postgres 9.3 > Postgres 9.3 > {code} > postgres=# select count(*) OVER(partition by type order by id) `tmp` from airports where tmp is not null; > ERROR: column "tmp" does not exist > LINE 1: ...ect count(*) OVER(partition by type order by id) `tmp` from ... > ^ > {code} > Drill 1.0 > {code} > 0: jdbc:drill:schema=dfs.tmp> select count(*) OVER(partition by columns[2] order by columns[0]) tmp from `airports.csv` where tmp is not null; > Error: SYSTEM ERROR: java.lang.IllegalArgumentException: Selected column(s) must have name 'columns' or must be plain '*' > Fragment 0:0 > [Error Id: 66987b81-fe50-422d-95e4-9ce61c873584 on centos-02.qa.lab:31010] (state=,code=0) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)