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

Paul Rogers commented on DRILL-4264:
------------------------------------

In the example case, what happens for:

{code}
SELECT `rk.q`, `m.a.b` FROM test_table;
{code}

To work, is it necessary to do this:

{code}
SELECT `rk.q`, m.`a.b` FROM test_table;
{code}

That is, is a dot inside back-ticks considered part of the name, but those 
outside considered separators?

I ask because I often do the following, and it works:

{code}
select `name`, `monisid`, `validitydate` from `dfs.data`.`gen.json`
{code}

That is, in the table name, dots inside backticks are, in fact, separators. So, 
do column and table names have different syntax rules?

Can we spell out the syntax rules for these three cases:

* Column names in the planner
* Table names in the planner
* Column names discovered at runtime

All that said, we should certainly make {{SELECT *}} work as the name expansion 
is done in the execution engine, not the planner.

> Dots in identifier are not escaped correctly
> --------------------------------------------
>
>                 Key: DRILL-4264
>                 URL: https://issues.apache.org/jira/browse/DRILL-4264
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Codegen
>            Reporter: Alex
>            Assignee: Volodymyr Vysotskyi
>
> If you have some json data like this...
> {code:javascript}
>     {
>       "0.0.1":{
>         "version":"0.0.1",
>         "date_created":"2014-03-15"
>       },
>       "0.1.2":{
>         "version":"0.1.2",
>         "date_created":"2014-05-21"
>       }
>     }
> {code}
> ... there is no way to select any of the rows since their identifiers contain 
> dots and when trying to select them, Drill throws the following error:
> Error: SYSTEM ERROR: UnsupportedOperationException: Unhandled field reference 
> "0.0.1"; a field reference identifier must not have the form of a qualified 
> name
> This must be fixed since there are many json data files containing dots in 
> some of the keys (e.g. when specifying version numbers etc)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to