drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khurram Faraaz (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-3676) Group by ordinal number of an output column results in parse error
Date Thu, 08 Oct 2015 21:38:29 GMT

     [ https://issues.apache.org/jira/browse/DRILL-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Khurram Faraaz updated DRILL-3676:
----------------------------------
    Assignee:     (was: Sean Hsuan-Yi Chu)

> 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
>             Fix For: Future
>
>
> 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)

Mime
View raw message