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 39EA41723F for ; Tue, 21 Apr 2015 20:00:00 +0000 (UTC) Received: (qmail 59465 invoked by uid 500); 21 Apr 2015 20:00:00 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 59283 invoked by uid 500); 21 Apr 2015 20:00:00 -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 58905 invoked by uid 99); 21 Apr 2015 20:00:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Apr 2015 19:59:59 +0000 Date: Tue, 21 Apr 2015 19:59:59 +0000 (UTC) From: "Parth Chandra (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-1575) kvgen function should eliminate keys with null values MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Parth Chandra updated DRILL-1575: --------------------------------- Component/s: Functions - Drill > kvgen function should eliminate keys with null values > ----------------------------------------------------- > > Key: DRILL-1575 > URL: https://issues.apache.org/jira/browse/DRILL-1575 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill > Reporter: Neeraja > Assignee: Mehant Baid > Priority: Critical > Fix For: 0.7.0 > > Attachments: DRILL-1575.patch > > > Here is the same JSON I am trying to query and use kvgen function with. > { > "name":"test", > "myarray":{ > "key1":2, > "key4":3, > "key2":4 > } > }{ > "name":"mytest", > "myarray":{ > "key3":2, > "key5":3, > "key6":4 > } > } > Currently , when I apply kvgen a list of 'unioned' columns are returned as keys in the result. For ex: both the result rows below have keys 1-6. > The expected result is only the keys that actually have values associated with them. > 0: jdbc:drill:zk=local> SELECT name, kvgen(myarray) FROM dfs.`default`.`/Users/nrentachintala/Downloads/apache-drill-0.7.0-incubating-SNAPSHOT/sample-data/mytest.json`; > +------------+------------+ > | name | EXPR$1 | > +------------+------------+ > | test | [{"key":"key1","value":2},{"key":"key4","value":3},{"key":"key2","value":4},{"key":"key3"},{"key":"key5"},{"key":"key6"}] | > | mytest | [{"key":"key1"},{"key":"key4"},{"key":"key2"},{"key":"key3","value":2},{"key":"key5","value":3},{"key":"key6","value":4}] | > +------------+------------+ -- This message was sent by Atlassian JIRA (v6.3.4#6332)