Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8405318664 for ; Fri, 26 Jun 2015 17:56:06 +0000 (UTC) Received: (qmail 90582 invoked by uid 500); 26 Jun 2015 17:56:06 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 90533 invoked by uid 500); 26 Jun 2015 17:56:06 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 90380 invoked by uid 99); 26 Jun 2015 17:56:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2015 17:56:06 +0000 Date: Fri, 26 Jun 2015 17:56:05 +0000 (UTC) From: "Jason Altekruse (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (DRILL-2167) Order by on a repeated index from the output of a flatten on large no of records results in incorrect results 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-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Altekruse resolved DRILL-2167. ------------------------------------ Resolution: Duplicate Fix Version/s: (was: 1.1.0) > Order by on a repeated index from the output of a flatten on large no of records results in incorrect results > ------------------------------------------------------------------------------------------------------------- > > Key: DRILL-2167 > URL: https://issues.apache.org/jira/browse/DRILL-2167 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Relational Operators > Reporter: Rahul Challapalli > Assignee: Jason Altekruse > Priority: Critical > Attachments: data.json > > > git.commit.id.abbrev=3e33880 > The below query results in 200006 records. Based on the data set we should only receive 200000 records. > {code} > select s.uid from (select d.uid, flatten(d.map.rm) rms from `data.json` d) s order by s.rms.rptd[1].d; > {code} > When I removed the order by part, drill correctly reported 200000 records. > {code} > select s.uid from (select d.uid, flatten(d.map.rm) rms from `data.json` d) s; > {code} > I attached the data set with 2 records. I copied over the data set 50000 times and ran the queries on top of it. Let me know if you have any other questions -- This message was sent by Atlassian JIRA (v6.3.4#6332)