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 BAF0218FDE for ; Thu, 9 Jul 2015 00:17:04 +0000 (UTC) Received: (qmail 43704 invoked by uid 500); 9 Jul 2015 00:17:04 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 43675 invoked by uid 500); 9 Jul 2015 00:17:04 -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 43664 invoked by uid 99); 9 Jul 2015 00:17:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2015 00:17:04 +0000 Date: Thu, 9 Jul 2015 00:17:04 +0000 (UTC) From: "Jason Altekruse (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-2838) Applying flatten after joining 2 sub-queries returns empty maps 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-2838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Altekruse updated DRILL-2838: ----------------------------------- Assignee: Hanifi Gunes (was: Jason Altekruse) > Applying flatten after joining 2 sub-queries returns empty maps > --------------------------------------------------------------- > > Key: DRILL-2838 > URL: https://issues.apache.org/jira/browse/DRILL-2838 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Relational Operators > Reporter: Rahul Challapalli > Assignee: Hanifi Gunes > Priority: Critical > Fix For: 1.2.0 > > Attachments: DRILL-2838.patch, data.json > > > git.commit.id.abbrev=5cd36c5 > The below query applies flatten after joining 2 subqueries. It generates empty maps which is wrong > {code} > select v1.uid, flatten(events), flatten(transactions) from > (select uid, events from `data.json`) v1 > inner join > (select uid, transactions from `data.json`) v2 > on v1.uid = v2.uid; > +------------+------------+------------+ > | uid | EXPR$1 | EXPR$2 | > +------------+------------+------------+ > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 1 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > | 2 | {} | {} | > +------------+------------+------------+ > 36 rows selected (0.244 seconds) > {code} > I attached the data set. Let me know if you have any questions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)