drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinfeng Ni (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DRILL-5469) Meaningless error message when trying to use a constant in an order by statement
Date Wed, 03 May 2017 23:33:04 GMT

    [ https://issues.apache.org/jira/browse/DRILL-5469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995902#comment-15995902
] 

Jinfeng Ni edited comment on DRILL-5469 at 5/3/17 11:32 PM:
------------------------------------------------------------

This is because * is dynamically expanded in Drill's execution time, not in planning time
like traditional RDBMS.  Using ordinal reference to a column list expanded from dynamic *
should not be allowed. Agreed that error message could be better for user to understand what
went wrong. 

btw: "5" is not a constant. it's interpreted as a ordinal reference (5-th element in the select
list).  



was (Author: jni):
This is because * is dynamically expanded in Drill's execution time, not in planning time
like traditional RDBMS.  Using ordinal reference to a column list expanded from dynamic *
should not be allowed. Agreed that error message could be better for user to understand what
went wrong. 




> Meaningless error message when trying to use a constant in an order by statement
> --------------------------------------------------------------------------------
>
>                 Key: DRILL-5469
>                 URL: https://issues.apache.org/jira/browse/DRILL-5469
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.10.0
>            Reporter: Rahul Challapalli
>
> git.commit.id.abbrev=1e0a14c
> While I agree that it does not make any sense to use a constant in an order by statement,
users could just have such a typo in a large query. It would be really helpful if drill could
point out precisely where the issue is. This is what I currently get
> {code}
> 0: jdbc:drill:zk=10.10.100.190:5181> select * from cp.`tpch/lineitem.parquet` order
by 5;
> Error: VALIDATION ERROR: At line 1, column 51: Ordinal out of range
> SQL Query null
> [Error Id: e5cf4f6c-3d2c-412e-90a1-863897587399 on qa-node190.qa.lab:31010] (state=,code=0)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message