Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2BA06200BC5 for ; Tue, 22 Nov 2016 13:59:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2A706160B0A; Tue, 22 Nov 2016 12:59:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6CEC4160B1E for ; Tue, 22 Nov 2016 13:58:59 +0100 (CET) Received: (qmail 20656 invoked by uid 500); 22 Nov 2016 12:58:58 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 20584 invoked by uid 99); 22 Nov 2016 12:58:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2016 12:58:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 54E8A2C2B10 for ; Tue, 22 Nov 2016 12:58:58 +0000 (UTC) Date: Tue, 22 Nov 2016 12:58:58 +0000 (UTC) From: "Nagarajan Chinnasamy (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-5063) Apache Drill Fails To Query MySQL View With Group By In Inner Select MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 22 Nov 2016 12:59:00 -0000 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: {code} 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` {code} 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: {code} { "type": "jdbc", "driver": "com.mysql.jdbc.Driver", "url": "jdbc:mysql://localhost:3306", "username": "xxxx", "password": "xxxx", "enabled": true } {code} When I issue the following query from sqlline.bat on windows: {code} select * from mydb.`mydb`.`customerview`; {code} I get the following error: {noformat} 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 {noformat} 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 (v6.3.4#6332)