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 A8455200C68 for ; Wed, 19 Apr 2017 01:49:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A6BF1160BAC; Tue, 18 Apr 2017 23:49:47 +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 C80B6160BA1 for ; Wed, 19 Apr 2017 01:49:46 +0200 (CEST) Received: (qmail 65119 invoked by uid 500); 18 Apr 2017 23:49:46 -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 65110 invoked by uid 99); 18 Apr 2017 23:49:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2017 23:49:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 939C51A0431 for ; Tue, 18 Apr 2017 23:49:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id bt9c5YtIzOrf for ; Tue, 18 Apr 2017 23:49:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 63F145FDC4 for ; Tue, 18 Apr 2017 23:49:43 +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 6F948E08B1 for ; Tue, 18 Apr 2017 23:49:42 +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 A588B21B52 for ; Tue, 18 Apr 2017 23:49:41 +0000 (UTC) Date: Tue, 18 Apr 2017 23:49:41 +0000 (UTC) From: "Boaz Ben-Zvi (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-5442) Managed Sort: IndexOutOfBounds with a join over an inlist MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 18 Apr 2017 23:49:47 -0000 [ https://issues.apache.org/jira/browse/DRILL-5442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Boaz Ben-Zvi updated DRILL-5442: -------------------------------- Description: The following query fails with IOOB when a managed sort is used, but passes with the old default sort: ========================================= 0: jdbc:drill:zk=local> alter session set `exec.sort.disable_managed` = false; +-------+-------------------------------------+ | ok | summary | +-------+-------------------------------------+ | true | exec.sort.disable_managed updated. | +-------+-------------------------------------+ 1 row selected (0.16 seconds) 0: jdbc:drill:zk=local> select * from dfs.`/data/json/s1/date_dim` where d_year in(1990, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919) limit 3; Error: SYSTEM ERROR: IndexOutOfBoundsException: index: 0, length: 1 (expected: range(0, 0)) Fragment 0:0 [Error Id: 370fd706-c365-421f-b57d-d6ab7fde82df on 10.250.56.251:31010] (state=,code=0) ================================================ (the above query was extracted from /root/drillAutomation/framework-master/framework/resources/Functional/tpcds/variants/hive/q4_1.sql ) Note that the inlist must have at least 20 items, in which case the plan becomes a join over a stream-aggregate over a sort over the (inlist's) values. When the IOOB happens, the stack does not show the sort anymore, but probably handling a NONE returned by the last next() on the sort ( StreamingAggTemplate.doWork():182 ) The "date_dim" can probably be made up with any data. The one above was taken from: [root@atsqa6c85 ~]# hadoop fs -ls /drill/testdata/tpcds/json/s1/date_dim Found 1 items -rwxr-xr-x 3 root root 50713534 2014-10-14 22:39 /drill/testdata/tpcds/json/s1/date_dim/0_0_0.json was: The following query fails with IOOB when a managed sort is used, but passes with the old default sort: ========================================= 0: jdbc:drill:zk=local> alter session set `exec.sort.disable_managed` = false; +-------+-------------------------------------+ | ok | summary | +-------+-------------------------------------+ | true | exec.sort.disable_managed updated. | +-------+-------------------------------------+ 1 row selected (0.16 seconds) 0: jdbc:drill:zk=local> select * from dfs.`/data/json/s1/date_dim` where d_year in(1990, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919) limit 3; Error: SYSTEM ERROR: IndexOutOfBoundsException: index: 0, length: 1 (expected: range(0, 0)) Fragment 0:0 [Error Id: 370fd706-c365-421f-b57d-d6ab7fde82df on 10.250.56.251:31010] (state=,code=0) ================================================ (the above query was extracted from /root/drillAutomation/framework-master/framework/resources/Functional/tpcds/variants/hive/q4_1.sql ) Note that the inlist must have at list 20 items, in which case the plan becomes a join over a stream-aggregate over a sort over the (inlist's) values. When the IOOB happens, the stack does not show the sort anymore, but probably handling a NONE returned by the last next() on the sort ( StreamingAggTemplate.doWork():182 ) The "date_dim" can probably be made up with any data. The one above was taken from: [root@atsqa6c85 ~]# hadoop fs -ls /drill/testdata/tpcds/json/s1/date_dim Found 1 items -rwxr-xr-x 3 root root 50713534 2014-10-14 22:39 /drill/testdata/tpcds/json/s1/date_dim/0_0_0.json > Managed Sort: IndexOutOfBounds with a join over an inlist > --------------------------------------------------------- > > Key: DRILL-5442 > URL: https://issues.apache.org/jira/browse/DRILL-5442 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Relational Operators > Affects Versions: 1.10.0 > Reporter: Boaz Ben-Zvi > Assignee: Paul Rogers > Fix For: 1.11.0 > > > The following query fails with IOOB when a managed sort is used, but passes with the old default sort: > ========================================= > 0: jdbc:drill:zk=local> alter session set `exec.sort.disable_managed` = false; > +-------+-------------------------------------+ > | ok | summary | > +-------+-------------------------------------+ > | true | exec.sort.disable_managed updated. | > +-------+-------------------------------------+ > 1 row selected (0.16 seconds) > 0: jdbc:drill:zk=local> select * from dfs.`/data/json/s1/date_dim` where d_year in(1990, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919) limit 3; > Error: SYSTEM ERROR: IndexOutOfBoundsException: index: 0, length: 1 (expected: range(0, 0)) > Fragment 0:0 > [Error Id: 370fd706-c365-421f-b57d-d6ab7fde82df on 10.250.56.251:31010] (state=,code=0) > > ================================================ > (the above query was extracted from /root/drillAutomation/framework-master/framework/resources/Functional/tpcds/variants/hive/q4_1.sql ) > Note that the inlist must have at least 20 items, in which case the plan becomes a join over a stream-aggregate over a sort over the (inlist's) values. When the IOOB happens, the stack does not show the sort anymore, but probably handling a NONE returned by the last next() on the sort ( StreamingAggTemplate.doWork():182 ) > The "date_dim" can probably be made up with any data. The one above was taken from: > [root@atsqa6c85 ~]# hadoop fs -ls /drill/testdata/tpcds/json/s1/date_dim > Found 1 items > -rwxr-xr-x 3 root root 50713534 2014-10-14 22:39 /drill/testdata/tpcds/json/s1/date_dim/0_0_0.json -- This message was sent by Atlassian JIRA (v6.3.15#6346)