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 1063910F31 for ; Thu, 20 Aug 2015 22:20:46 +0000 (UTC) Received: (qmail 63432 invoked by uid 500); 20 Aug 2015 22:20:46 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 63398 invoked by uid 500); 20 Aug 2015 22:20: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 63388 invoked by uid 99); 20 Aug 2015 22:20:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2015 22:20:45 +0000 Date: Thu, 20 Aug 2015 22:20:45 +0000 (UTC) From: "Sean Hsuan-Yi Chu (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-3676) Group by ordinal number of an output column results in parse error 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-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Hsuan-Yi Chu updated DRILL-3676: ------------------------------------- Fix Version/s: 1.4.0 > Group by ordinal number of an output column results in parse error > ------------------------------------------------------------------ > > Key: DRILL-3676 > URL: https://issues.apache.org/jira/browse/DRILL-3676 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.2.0 > Reporter: Khurram Faraaz > Assignee: Sean Hsuan-Yi Chu > Priority: Critical > Fix For: 1.4.0 > > > Group by number results in parse error. > {code} > 0: jdbc:drill:schema=dfs.tmp> select sub_q.col1 from (select col1 from FEWRWSPQQ_101) sub_q group by 1; > Error: PARSE ERROR: At line 1, column 8: Expression 'q.col1' is not being grouped > [Error Id: 0eedafd9-372e-4610-b7a8-d97e26458d58 on centos-02.qa.lab:31010] (state=,code=0) > {code} > When we use the column name instead of the number, the query compiles and returns results. > {code} > 0: jdbc:drill:schema=dfs.tmp> select col1 from (select col1 from FEWRWSPQQ_101) group by col1; > +----------------------+ > | col1 | > +----------------------+ > | 65534 | > | 10000000 | > | -1 | > | 0 | > | 1 | > | 13 | > | 17 | > | 23 | > | 1000 | > | 9999999 | > | 30 | > | 25 | > | 1001 | > | -65535 | > | 5000 | > | 3000 | > | 200 | > | 197 | > | 4611686018427387903 | > | 9223372036854775806 | > | 9223372036854775807 | > | 92233720385475807 | > +----------------------+ > 22 rows selected (0.218 seconds) > {code} > {code} > 0: jdbc:drill:schema=dfs.tmp> select sub_query.col1 from (select col1 from FEWRWSPQQ_101) sub_query group by sub_query.col1; > +----------------------+ > | col1 | > +----------------------+ > | 65534 | > | 10000000 | > | -1 | > | 0 | > | 1 | > | 13 | > | 17 | > | 23 | > | 1000 | > | 9999999 | > | 30 | > | 25 | > | 1001 | > | -65535 | > | 5000 | > | 3000 | > | 200 | > | 197 | > | 4611686018427387903 | > | 9223372036854775806 | > | 9223372036854775807 | > | 92233720385475807 | > +----------------------+ > 22 rows selected (0.177 seconds) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)