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 2F980C3EC for ; Wed, 12 Nov 2014 18:34:55 +0000 (UTC) Received: (qmail 22378 invoked by uid 500); 12 Nov 2014 18:34:55 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 22350 invoked by uid 500); 12 Nov 2014 18:34:55 -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 22341 invoked by uid 99); 12 Nov 2014 18:34:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2014 18:34:55 +0000 X-ASF-Spam-Status: No, hits=-2000.6 required=5.0 tests=ALL_TRUSTED,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; Wed, 12 Nov 2014 18:34:54 +0000 Received: (qmail 22216 invoked by uid 99); 12 Nov 2014 18:34:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2014 18:34:33 +0000 Date: Wed, 12 Nov 2014 18:34:33 +0000 (UTC) From: "Rahul Challapalli (JIRA)" To: issues@drill.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-1653) flatten function over kvgen gives wrong output when kvgen returns an empty map 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-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14208411#comment-14208411 ] Rahul Challapalli commented on DRILL-1653: ------------------------------------------ Verified this with the latest master and it looks good git.commit.id.abbrev=1e21045 > flatten function over kvgen gives wrong output when kvgen returns an empty map > ------------------------------------------------------------------------------ > > Key: DRILL-1653 > URL: https://issues.apache.org/jira/browse/DRILL-1653 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill, Storage - JSON > Reporter: Rahul Challapalli > > git.commit.id.abbrev=60aa446 > I ran the below test against the private branch of Jason which has some patches for bugs related to flatten which are not yet merged into the master. > Dataset used: > {code} > { > "id": 1, > "m": {"a":1,"b":2} > } > { > "id": 2 > } > { > "id": 3, > "m": {"c":3,"d":4} > } > {code} > kvgen works as expected > {code} > select id, kvgen(m) from `json_kvgenflatten/missing-map.json`; > +------------+------------+ > | id | EXPR$1 | > +------------+------------+ > | 1 | [{"key":"a","value":1},{"key":"b","value":2}] | > | 2 | [] | > | 3 | [{"key":"c","value":3},{"key":"d","value":4}] | > {code} > Applying a flatten on top of kvgen returns wrong results > {code} > select id, flatten(kvgen(m)) from `json_kvgenflatten/missing-map.json`; > +------------+------------+ > | id | EXPR$1 | > +------------+------------+ > | 1 | {"key":"\u0001","value":3} | > | 1 | {"key":"\u0001","value":4} | > | 3 | {} | > | 3 | {} | > +------------+------------+ > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)