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 28545200B74 for ; Fri, 22 Jul 2016 00:42:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 272CC160A90; Thu, 21 Jul 2016 22:42:22 +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 61CA2160A73 for ; Fri, 22 Jul 2016 00:42:21 +0200 (CEST) Received: (qmail 48269 invoked by uid 500); 21 Jul 2016 22:42:20 -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 48240 invoked by uid 99); 21 Jul 2016 22:42:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jul 2016 22:42:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7B7AD2C029E for ; Thu, 21 Jul 2016 22:42:20 +0000 (UTC) Date: Thu, 21 Jul 2016 22:42:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4783) Flatten on CONVERT_FROM fails with ClassCastException if resultset is empty MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 21 Jul 2016 22:42:22 -0000 [ https://issues.apache.org/jira/browse/DRILL-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388551#comment-15388551 ] ASF GitHub Bot commented on DRILL-4783: --------------------------------------- Github user jinfengni commented on the issue: https://github.com/apache/drill/pull/546 I picked the latest commit, and am running the regression. Will merge to master if everything runs fine. > Flatten on CONVERT_FROM fails with ClassCastException if resultset is empty > --------------------------------------------------------------------------- > > Key: DRILL-4783 > URL: https://issues.apache.org/jira/browse/DRILL-4783 > Project: Apache Drill > Issue Type: Bug > Reporter: Chunhui Shi > Assignee: Chunhui Shi > Priority: Critical > > Flatten failed to work on top of convert_from when the resultset is empty. > For a HBase table like this: > 0: jdbc:drill:zk=localhost:5181> select convert_from(t.address.cities,'json') from hbase.`/tmp/flattentest` t; > +----------------------------------------------------------------------------------+ > | EXPR$0 | > +----------------------------------------------------------------------------------+ > | {"list":[{"city":"SunnyVale"},{"city":"Palo Alto"},{"city":"Mountain View"}]} | > | {"list":[{"city":"Seattle"},{"city":"Bellevue"},{"city":"Renton"}]} | > | {"list":[{"city":"Minneapolis"},{"city":"Falcon Heights"},{"city":"San Paul"}]} | > +----------------------------------------------------------------------------------+ > Flatten works when row_key is in (1,2,3) > 0: jdbc:drill:zk=localhost:5181> select flatten(t1.json.list) from (select convert_from(t.address.cities,'json') json from hbase.`/tmp/flattentest` t where row_key=1) t1; > +---------------------------+ > | EXPR$0 | > +---------------------------+ > | {"city":"SunnyVale"} | > | {"city":"Palo Alto"} | > | {"city":"Mountain View"} | > +---------------------------+ > But Flatten throws exception if the resultset is empty > 0: jdbc:drill:zk=localhost:5181> select flatten(t1.json.list) from (select convert_from(t.address.cities,'json') json from hbase.`/tmp/flattentest` t where row_key=4) t1; > Error: SYSTEM ERROR: ClassCastException: Cannot cast org.apache.drill.exec.vector.NullableIntVector to org.apache.drill.exec.vector.complex.RepeatedValueVector > Fragment 0:0 > [Error Id: 07fd0cab-d1e6-4259-bfec-ad80f02d93a2 on atsqa4-127.qa.lab:31010] (state=,code=0) -- This message was sent by Atlassian JIRA (v6.3.4#6332)