Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.8.0
-
None
-
None
Description
When any Jdbc Plugin enabled (ex: MySql) implicit columns are returned as part of select * query.
Simple json:
{id: 1, name: "Bob"}
When Jdbc plugin is enabled:
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]]])
When Jdbc plugin is disabled:
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]]])
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.
Attachments
Issue Links
- relates to
-
DRILL-5538 Create TopProject with validatedNodeType after PHYSICAL phase
- Resolved