drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nagarajan Chinnasamy <nagarajanchinnas...@gmail.com>
Subject Re: Querying MySQL View Fails with DATA_READ ERROR
Date Tue, 15 Nov 2016 04:39:14 GMT
Can somebody please confirm if you are able to reproduce this problem with
"group by" in mysql views.

Its important to have this problem fixed to use Drill in my project.

Appreciate your time and help.

Thanks,
Nagu.

On Nov 12, 2016 16:19, "Nagarajan Chinnasamy" <nagarajanchinnasamy@gmail.com>
wrote:

> Facing this problem with:
>
> MySQL Version: 5.7.8
> Drill Version: 1.7 and 1.8
> MySQL JDBC Connector: mysql-connector-java-5.1.39-bin.jar
>
> I have created a view on MySQL using the following query:
>
> create or replace view `mydb`.`customerview` as
> select
> `cust`.`Id` as `Customer`,
> `tnt`.`Id` as `Tenant`
> from
> `mydb`.`Customer` cust
> left join (
> select
> `t`.Id as Id
> from
> `mydb`.`Tenant` t
> group by t.Id) tnt
> on
> `cust`.`Tenant`=`tnt`.`Id`
>
>
> Please note that above query was purposely written so to reproduce the
> problem.
>
> In Drill I have created a storage plugin named mydb with following
> configuration:
>
>
> {
>   "type": "jdbc",
>   "driver": "com.mysql.jdbc.Driver",
>   "url": "jdbc:mysql://localhost:3306",
>   "username": "root",
>   "password": "root",
>   "enabled": true
> }
>
>
> When I issue the following query from sqlline.bat on windows:
>
> select * from mydb.`mydb`.`customerview`;
>
>
> I get the following error:
>
> Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup
> the SQL query.
>
> sql SELECT *
> FROM `mydb`.`customerview`
> plugin mydb
> Fragment 0:0
>
>
> Also, please note that if I remove "group by" in the inner select query,
> the error goes away.
>
> Please explain whats going on? Or is this a bug?
>
>
> Best Regards,
> Nagu.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message