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 8158718330 for ; Fri, 8 May 2015 22:16:00 +0000 (UTC) Received: (qmail 57429 invoked by uid 500); 8 May 2015 22:16:00 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 57400 invoked by uid 500); 8 May 2015 22:16: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 57390 invoked by uid 99); 8 May 2015 22:16:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2015 22:16:00 +0000 Date: Fri, 8 May 2015 22:16:00 +0000 (UTC) From: "Victoria Markman (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-1986) Natural join query returns wrong result 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-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Victoria Markman updated DRILL-1986: ------------------------------------ Labels: no_verified_test (was: ) > Natural join query returns wrong result > --------------------------------------- > > Key: DRILL-1986 > URL: https://issues.apache.org/jira/browse/DRILL-1986 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 0.8.0 > Reporter: Victoria Markman > Assignee: Sean Hsuan-Yi Chu > Labels: no_verified_test > > Natural join returns wrong result: > {code} > 0: jdbc:drill:schema=dfs> select * from `t1.json`; > +------------+------------+------------+ > | a1 | b1 | c1 | > +------------+------------+------------+ > | 1 | 1 | 2015-01-01 | > | 2 | 2 | 2015-01-02 | > +------------+------------+------------+ > 2 rows selected (0.087 seconds) > 0: jdbc:drill:schema=dfs> select * from `t2.json`; > +------------+------------+------------+ > | a1 | b1 | c1 | > +------------+------------+------------+ > | 1 | 1 | 2015-01-01 | > +------------+------------+------------+ > 1 row selected (0.112 seconds) > 0: jdbc:drill:schema=dfs> select * from `t1.json` natural join `t2.json`; > +------------+------------+------------+------------+------------+------------+ > | a1 | b1 | c1 | a10 | b10 | c10 | > +------------+------------+------------+------------+------------+------------+ > +------------+------------+------------+------------+------------+------------+ > No rows selected (0.223 seconds) > {code} > Equivalent inner join query returns one row: > {code} > 0: jdbc:drill:schema=dfs> select * from `t1.json` t1, `t2.json` t2 where t1.a1=t2.a1 and t1.b1=t2.b1 and t1.c1=t2.c1; > +------------+------------+------------+------------+------------+------------+ > | a1 | b1 | c1 | a10 | b10 | c10 | > +------------+------------+------------+------------+------------+------------+ > | 1 | 1 | 2015-01-01 | 1 | 1 | 2015-01-01 | > +------------+------------+------------+------------+------------+------------+ > 1 row selected (0.732 seconds) > {code} > Natural join is listed as supported in our documentation. > If we decide not to support it, we need to make sure to remove it from docs as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)