drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volodymyr Vysotskyi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4264) Dots in identifier are not escaped correctly
Date Mon, 17 Jul 2017 10:28:02 GMT

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

Volodymyr Vysotskyi commented on DRILL-4264:
--------------------------------------------

I think we shouldn't allow dots in the names of plugins and workspaces since Drill user can
control these names and schema names are stored without quotes. So for example when we will
have a plugin with name {{`df.s`}}, a plugin with name {{`df`}} and workspace in it with name
{{`s`}}, schema name {{df.s}} will refer to the two schemes. 

For the table, directory or file names, dots are allowed. The path to the table in the query
is specifying using quotes. The same for table names with dots. 

Currently, dots are allowed for column aliases and they are quoted also. 
But Drill may create a table using the column alias with dots and will fail at the execution
stage when it will try to do a {{select *}}. 

The solution that I am proposed in [my comment|https://issues.apache.org/jira/browse/DRILL-4264?focusedCommentId=16085700&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16085700]
does not change the current syntax of Drill queries, I think the current syntax is fine. The
proposed solution allows Drill does not fail when it will discover such columns in the table.

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

Mime
View raw message