Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EFC42200CDB for ; Fri, 21 Jul 2017 19:55:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ECBEB16D978; Fri, 21 Jul 2017 17:55:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4012116D976 for ; Fri, 21 Jul 2017 19:55:05 +0200 (CEST) Received: (qmail 83598 invoked by uid 500); 21 Jul 2017 17:55: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 83589 invoked by uid 99); 21 Jul 2017 17:55:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2017 17:55:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E6097C3904 for ; Fri, 21 Jul 2017 17:55:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id tVvB_xpduU7P for ; Fri, 21 Jul 2017 17:55:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2A80D5FDA1 for ; Fri, 21 Jul 2017 17:55:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 342CDE0E4E for ; Fri, 21 Jul 2017 17:55:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 639E321EF4 for ; Fri, 21 Jul 2017 17:55:00 +0000 (UTC) Date: Fri, 21 Jul 2017 17:55:00 +0000 (UTC) From: "Arina Ielchiieva (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-5165) wrong results - LIMIT ALL and OFFSET clause in same query MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 21 Jul 2017 17:55:06 -0000 [ https://issues.apache.org/jira/browse/DRILL-5165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arina Ielchiieva updated DRILL-5165: ------------------------------------ Labels: (was: ready-to-commit) > wrong results - LIMIT ALL and OFFSET clause in same query > --------------------------------------------------------- > > Key: DRILL-5165 > URL: https://issues.apache.org/jira/browse/DRILL-5165 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.10.0 > Reporter: Khurram Faraaz > Assignee: Chunhui Shi > Priority: Critical > Fix For: 1.12.0 > > > This issue was reported by a user on Drill's user list. > Drill 1.10.0 commit ID : bbcf4b76 > I tried a similar query on apache Drill 1.10.0 and Drill returns wrong results when compared to Postgres, for a query that uses LIMIT ALL and OFFSET clause in the same query. We need to file a JIRA to track this issue. > {noformat} > 0: jdbc:drill:schema=dfs.tmp> select col_int from typeall_l order by 1 limit all offset 10; > +----------+ > | col_int | > +----------+ > +----------+ > No rows selected (0.211 seconds) > 0: jdbc:drill:schema=dfs.tmp> select col_int from typeall_l order by col_int limit all offset 10; > +----------+ > | col_int | > +----------+ > +----------+ > No rows selected (0.24 seconds) > {noformat} > Query => select col_int from typeall_l limit all offset 10; > Drill 1.10.0 returns 85 rows > whereas for same query, > postgres=# select col_int from typeall_l limit all offset 10; > Postgres 9.3 returns 95 rows, which is the correct expected result. > Query plan for above query that returns wrong results > {noformat} > 0: jdbc:drill:schema=dfs.tmp> explain plan for select col_int from typeall_l limit all offset 10; > +------+------+ > | text | json | > +------+------+ > | 00-00 Screen > 00-01 Project(col_int=[$0]) > 00-02 SelectionVectorRemover > 00-03 Limit(offset=[10]) > 00-04 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:///tmp/typeall_l]], selectionRoot=maprfs:/tmp/typeall_l, numFiles=1, usedMetadataFile=false, columns=[`col_int`]]]) > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)