Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6FB5010976 for ; Mon, 24 Nov 2014 19:55:34 +0000 (UTC) Received: (qmail 15882 invoked by uid 500); 24 Nov 2014 19:55:34 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 15853 invoked by uid 500); 24 Nov 2014 19:55:34 -0000 Mailing-List: contact issues-help@drill.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.incubator.apache.org Delivered-To: mailing list issues@drill.incubator.apache.org Received: (qmail 15844 invoked by uid 99); 24 Nov 2014 19:55:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2014 19:55:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 24 Nov 2014 19:55:33 +0000 Received: (qmail 15492 invoked by uid 99); 24 Nov 2014 19:55:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2014 19:55:13 +0000 Date: Mon, 24 Nov 2014 19:55:13 +0000 (UTC) From: "Jason Altekruse (JIRA)" To: issues@drill.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-1741) kvgen does not work with nested map/unions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DRILL-1741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14223419#comment-14223419 ] Jason Altekruse commented on DRILL-1741: ---------------------------------------- +1 > kvgen does not work with nested map/unions > ------------------------------------------ > > Key: DRILL-1741 > URL: https://issues.apache.org/jira/browse/DRILL-1741 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill > Affects Versions: 0.7.0 > Reporter: Hao Zhu > Assignee: Mehant Baid > Fix For: 0.7.0 > > Attachments: DRILL-1741.patch > > > Tested on latest 0.7.0. > kvgen function does not work well with nested maps/unions. > 1. This works fine: > {code} > $ cat test_work.json > { > "data" : { > "col1" : "aaa" > } > } > {code} > {code} > 0: jdbc:drill:zk=local> select kvgen(tab.data) from `test_work.json` tab; > +------------+ > | EXPR$0 | > +------------+ > | [{"key":"col1","value":"aaa"}] | > +------------+ > 1 row selected (0.034 seconds) > {code} > 2. This failed: > {code} > $ cat test7.json > { > "data" : { > "col1" : { > "one" : "aaa" > } > } > } > {code} > {code} > 0: jdbc:drill:zk=local> select kvgen(tab.data) from `test7.json` tab; > +------------+ > | EXPR$0 | > +------------+ > Query failed: Failure while running fragment., Mappify does not support input of type: MAP [ d2bfea52-9935-4d63-8ecc-52315a3c7c7b on 10.250.0.115:31010 ] > java.lang.RuntimeException: java.sql.SQLException: Failure while executing query. > at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514) > at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148) > at sqlline.SqlLine.print(SqlLine.java:1809) > at sqlline.SqlLine$Commands.execute(SqlLine.java:3766) > at sqlline.SqlLine$Commands.sql(SqlLine.java:3663) > at sqlline.SqlLine.dispatch(SqlLine.java:889) > at sqlline.SqlLine.begin(SqlLine.java:763) > at sqlline.SqlLine.start(SqlLine.java:498) > at sqlline.SqlLine.main(SqlLine.java:460) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)