drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nagarajan Chinnasamy (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5063) Apache Drill Fails To Query MySQL View With Group By In Inner Select
Date Tue, 22 Nov 2016 12:58:58 GMT
Nagarajan Chinnasamy created DRILL-5063:

             Summary: Apache Drill Fails To Query MySQL View With Group By In Inner Select
                 Key: DRILL-5063
                 URL: https://issues.apache.org/jira/browse/DRILL-5063
             Project: Apache Drill
          Issue Type: Bug
          Components: Client - JDBC, Storage - JDBC
    Affects Versions: 1.8.0, 1.7.0
            Reporter: Nagarajan Chinnasamy
            Priority: Critical

I am using

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
   `cust`.`Id` as `Customer`,
    `tnt`.`Id` as `Tenant`
   `mydb`.`Customer` cust
left join (
        `t`.Id as Id
        `mydb`.`Tenant` t
    group by t.Id) tnt
Please note that above query was purposely written so to reproduce the problem when using
group by.

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": "xxxx",
  "password": "xxxx",
  "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!!

This message was sent by Atlassian JIRA

View raw message