[
https://issues.apache.org/jira/browse/DRILL-5469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995902#comment-15995902
]
Jinfeng Ni commented on DRILL-5469:
-----------------------------------
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)