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 9CBDB200BDE for ; Thu, 1 Dec 2016 23:25:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9B643160B25; Thu, 1 Dec 2016 22:25: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 E17D6160B0B for ; Thu, 1 Dec 2016 23:24:59 +0100 (CET) Received: (qmail 10538 invoked by uid 500); 1 Dec 2016 22:24:59 -0000 Mailing-List: contact issues-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 issues@drill.apache.org Received: (qmail 10526 invoked by uid 99); 1 Dec 2016 22:24:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2016 22:24:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C13052C1F56 for ; Thu, 1 Dec 2016 22:24:58 +0000 (UTC) Date: Thu, 1 Dec 2016 22:24:58 +0000 (UTC) From: "Holger Kiel (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4984) Limit 0 raises NullPointerException on JDBC storage sources MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 01 Dec 2016 22:25:00 -0000 [ https://issues.apache.org/jira/browse/DRILL-4984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Holger Kiel updated DRILL-4984: ------------------------------- Affects Version/s: 1.9.0 > Limit 0 raises NullPointerException on JDBC storage sources > ----------------------------------------------------------- > > Key: DRILL-4984 > URL: https://issues.apache.org/jira/browse/DRILL-4984 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.8.0, 1.9.0 > Environment: Latest 1.9 release also 1.8 release version, > mysql-connector-java-5.1.30, mysql-connector-java-5.1.40 > Reporter: Holger Kiel > > NullPointerExceptions occur when a query with 'limit 0' is executed on a jdbc storage source (e.g. Mysql): > {code} > 0: jdbc:drill:zk=local> select * from mysql.sugarcrm.sales_person limit 0; > Error: SYSTEM ERROR: NullPointerException > [Error Id: 6cd676fc-6db9-40b3-81d5-c2db044aeb77 on localhost:31010] > (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception during fragment initialization: null > org.apache.drill.exec.work.foreman.Foreman.run():281 > java.util.concurrent.ThreadPoolExecutor.runWorker():1142 > java.util.concurrent.ThreadPoolExecutor$Worker.run():617 > java.lang.Thread.run():745 > Caused By (java.lang.NullPointerException) null > org.apache.drill.exec.planner.sql.handlers.FindHardDistributionScans.visit():55 > org.apache.calcite.rel.core.TableScan.accept():166 > org.apache.calcite.rel.RelShuttleImpl.visitChild():53 > org.apache.calcite.rel.RelShuttleImpl.visitChildren():68 > org.apache.calcite.rel.RelShuttleImpl.visit():126 > org.apache.calcite.rel.AbstractRelNode.accept():256 > org.apache.calcite.rel.RelShuttleImpl.visitChild():53 > org.apache.calcite.rel.RelShuttleImpl.visitChildren():68 > org.apache.calcite.rel.RelShuttleImpl.visit():126 > org.apache.calcite.rel.AbstractRelNode.accept():256 > org.apache.drill.exec.planner.sql.handlers.FindHardDistributionScans.canForceSingleMode():45 > org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():262 > org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():290 > org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():168 > org.apache.drill.exec.planner.sql.DrillSqlWorker.getPhysicalPlan():123 > org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():97 > org.apache.drill.exec.work.foreman.Foreman.runSQL():1008 > org.apache.drill.exec.work.foreman.Foreman.run():264 > java.util.concurrent.ThreadPoolExecutor.runWorker():1142 > java.util.concurrent.ThreadPoolExecutor$Worker.run():617 > java.lang.Thread.run():745 (state=,code=0) > 0: jdbc:drill:zk=local> select * from mysql.sugarcrm.sales_person limit 1; > +-----+-------------+----------------+------------+-------------+ > | id | first_name | last_name | full_name | manager_id | > +-----+-------------+----------------+------------+-------------+ > | 1 | null | Administrator | admin | 0 | > +-----+-------------+----------------+------------+-------------+ > 1 row selected (0,235 seconds) > {code} > Other datasources are okay: > {code} > 0: jdbc:drill:zk=local> SELECT * FROM cp.`employee.json` LIMIT 0; > +------+-----------+-----------+---------+--------------+------------+-------------+------------+--------------+-----------------+-----------+----------------+-------------+------------+---------+----------------+------------------+-----------------+---------+------------------+ > | fqn | filename | filepath | suffix | employee_id | full_name | first_name | last_name | position_id | position_title | store_id | department_id | birth_date | hire_date | salary | supervisor_id | education_level | marital_status | gender | management_role | > +------+-----------+-----------+---------+--------------+------------+-------------+------------+--------------+-----------------+-----------+----------------+-------------+------------+---------+----------------+------------------+-----------------+---------+------------------+ > +------+-----------+-----------+---------+--------------+------------+-------------+------------+--------------+-----------------+-----------+----------------+-------------+------------+---------+----------------+------------------+-----------------+---------+------------------+ > No rows selected (0,309 seconds) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)