drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arina Ielchiieva (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-4903) Implicit columns are shown when Jdbc plugin is enabled
Date Tue, 27 Jun 2017 13:42:00 GMT

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

Arina Ielchiieva resolved DRILL-4903.
-------------------------------------
    Resolution: Fixed
      Assignee: Arina Ielchiieva

Fixed in the scope of DRILL-5538.

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

Mime
View raw message