Apache Drill Fails To Query MySQL View With Group By -
i using
mysql version: 5.7.8 drill version: 1.7 , 1.8 mysql jdbc connector: mysql-connector-java-5.1.39-bin.jar
i have created view on mysql using following query:
create or replace view `mydb`.`customerview` select `cust`.`id` `customer`, `tnt`.`id` `tenant` `mydb`.`customer` cust left join ( select `t`.id id `mydb`.`tenant` t group t.id) tnt on `cust`.`tenant`=`tnt`.`id`
please note above query purposely written reproduce problem when using group by
.
in drill have created storage plugin named mydb following configuration:
{ "type": "jdbc", "driver": "com.mysql.jdbc.driver", "url": "jdbc:mysql://localhost:3306", "username": "xxxx", "password": "xxxx", "enabled": true }
when issue following query sqlline.bat on windows:
select * mydb.`mydb`.`customerview`;
i following error:
error: data_read error: jdbc storage plugin failed while trying setup sql query.
sql select *
mydb
.customerview
plugin mydb fragment 0:0
also, please note if remove group by
in inner select query, error goes away.
please explain whats going on? or bug?
Comments
Post a Comment