You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Abhishek Girish (JIRA)" <ji...@apache.org> on 2015/06/05 03:19:38 UTC

[jira] [Created] (DRILL-3256) Error message can be improved when query fails due to an invalid position in ORDER BY clause

Abhishek Girish created DRILL-3256:
--------------------------------------

             Summary: Error message can be improved when query fails due to an invalid position in ORDER BY clause
                 Key: DRILL-3256
                 URL: https://issues.apache.org/jira/browse/DRILL-3256
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
    Affects Versions: 1.1.0
            Reporter: Abhishek Girish
            Assignee: Jinfeng Ni
            Priority: Minor


Error message from Drill:
{code:sql}
>  select s_city, s_store_sk, sum(s_number_employees)  from store group by s_city, s_store_sk ORDER BY 40 limit 10;
Error: PARSE ERROR: From line 1, column 101 to line 1, column 102: Ordinal out of range
[Error Id: 0458fba1-afd6-48cf-89ba-1e4c107d2426 on abhi8.qa.lab:31010] (state=,code=0)
{code}

Error message from Postgres:
{code:sql}
# select s_city, s_store_sk, avg(s_number_employees) from store group by s_city, s_store_sk order by 5,6 limit 10;
ERROR:  *ORDER BY position 5 is not in select list*
LINE 1: ...) from store group by s_city, s_store_sk order by 5,6 limit ...
                                                                                               ^
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)