drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khurram Faraaz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-3676) Group by column number results in parse error
Date Thu, 20 Aug 2015 18:06:45 GMT
Khurram Faraaz created DRILL-3676:
-------------------------------------

             Summary: Group by column number results in parse error
                 Key: DRILL-3676
                 URL: https://issues.apache.org/jira/browse/DRILL-3676
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Relational Operators
    Affects Versions: 1.2.0
            Reporter: Khurram Faraaz
            Assignee: Chris Westin
            Priority: Critical


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