drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Hyde (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1064) Unexpected results when selecting for arbitrary alphanumic column
Date Wed, 25 Jun 2014 02:33:24 GMT

    [ 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)

Mime
View raw message