[
https://issues.apache.org/jira/browse/DRILL-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14042977#comment-14042977
]
Julian Hyde commented on DRILL-1064:
------------------------------------
I believe that the SQL standard disallows column names start start with digits.
If by its good grace Drill allows such column names, you can persuade the
parser that they are identifiers by enclosing in back-ticks:
{code:sql}
select `1231q235` from `hive43.default`.`bit_table`;
{code}
> Unexpected results when selecting for arbitrary alphanumic column
> -----------------------------------------------------------------
>
> Key: DRILL-1064
> URL: https://issues.apache.org/jira/browse/DRILL-1064
> Project: Apache Drill
> Issue Type: Bug
> Components: SQL Parser
> Reporter: Norris Lee
>
> When selecting for an alphanumeric column that starts with numbers, the
> starting numbers end up as values and the remainder become the column name.
> {code}
> 0: jdbc:drill:zk=localhost:5181> select 1231q235 from
> `hive43.default`.`bit_table`;
> +------------+
> | q235 |
> +------------+
> | 1231 |
> | 1231 |
> +------------+
> 2 rows selected (0.356 seconds)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)