You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Arina Ielchiieva (JIRA)" <ji...@apache.org> on 2017/06/27 13:41:00 UTC

[jira] [Updated] (DRILL-4903) Implicit columns are shown when Jdbc plugin is enabled

     [ https://issues.apache.org/jira/browse/DRILL-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arina Ielchiieva updated DRILL-4903:
------------------------------------
    Fix Version/s:     (was: Future)
                   1.11.0

> Implicit columns are shown when Jdbc plugin is enabled
> ------------------------------------------------------
>
>                 Key: DRILL-4903
>                 URL: https://issues.apache.org/jira/browse/DRILL-4903
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.8.0
>            Reporter: Arina Ielchiieva
>            Priority: Minor
>             Fix For: 1.11.0
>
>
> When any Jdbc Plugin enabled (ex: MySql) implicit columns are returned as part of select * query. 
> Simple json:
> {noformat}
> {id: 1, name: "Bob"}
> {noformat}
> When Jdbc plugin is enabled:
> {noformat}
> 0: jdbc:drill:zk=local> select * from dfs.`/home/osboxes/files/simple.json`;
> +----------------------------------+----------------------+--------------+---------+-----+-------+
> |               fqn                |       filepath       |   filename   | suffix  | id  | name  |
> +----------------------------------+----------------------+--------------+---------+-----+-------+
> | /home/osboxes/files/simple.json  | /home/osboxes/files  | simple.json  | json    | 1   | Bob   |
> +----------------------------------+----------------------+--------------+---------+-----+-------+
> 1 row selected (0.203 seconds)
> 0: jdbc:drill:zk=local> explain plan for select * from dfs.`/home/osboxes/files/simple.json`;
> +------+------+
> | text | json |
> +------+------+
> | 00-00    Screen
> 00-01      Scan(groupscan=[EasyGroupScan [selectionRoot=file:/home/osboxes/files/simple.json, numFiles=1, columns=[`*`], files=[file:/home/osboxes/files/simple.json]]])
> {noformat}
> When Jdbc plugin is disabled:
> {noformat}
> 0: jdbc:drill:zk=local> select * from dfs.`/home/osboxes/files/simple.json`;
> +-----+-------+
> | id  | name  |
> +-----+-------+
> | 1   | Bob   |
> +-----+-------+
> 1 row selected (0.547 seconds)
> 0: jdbc:drill:zk=local> explain plan for select * from dfs.`/home/osboxes/files/simple.json`;
> +------+------+
> | text | json |
> +------+------+
> | 00-00    Screen
> 00-01      Project(*=[$0])
> 00-02        Scan(groupscan=[EasyGroupScan [selectionRoot=file:/home/osboxes/files/simple.json, numFiles=1, columns=[`*`], files=[file:/home/osboxes/files/simple.json]]])
> {noformat}
> The problem is that implicit columns are removed from queries with select * clause during project stage. But JdbcStoragePlugin adds ProjectRemoveRules.class to rules which simplifies query plan and removes project stage.
> https://github.com/apache/drill/blob/master/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java#L140



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