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 97E27200CE6 for ; Fri, 15 Sep 2017 23:58:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 96BCC1609D3; Fri, 15 Sep 2017 21:58: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 E34791609C9 for ; Fri, 15 Sep 2017 23:58:04 +0200 (CEST) Received: (qmail 66506 invoked by uid 500); 15 Sep 2017 21:58:02 -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 66491 invoked by uid 99); 15 Sep 2017 21:58:02 -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, 15 Sep 2017 21:58:02 +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 75230C4A38 for ; Fri, 15 Sep 2017 21:58:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 0_jOA1sBUXrK for ; Fri, 15 Sep 2017 21:58:01 +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 2D2ED5F666 for ; Fri, 15 Sep 2017 21:58:01 +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 77534E0EE9 for ; Fri, 15 Sep 2017 21:58:00 +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 3497025383 for ; Fri, 15 Sep 2017 21:58:00 +0000 (UTC) Date: Fri, 15 Sep 2017 21:58:00 +0000 (UTC) From: "Timothy Farkas (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5755) TOP_N_SORT operator does not free memory while running MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 15 Sep 2017 21:58:05 -0000 [ https://issues.apache.org/jira/browse/DRILL-5755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16168585#comment-16168585 ] Timothy Farkas commented on DRILL-5755: --------------------------------------- Hey [~cchang@maprtech.com] I'm wrapping up some other PRs today. I will start working on this first thing next week. Let me know what your timeline is, and I will try to get this done. Thanks, Tim > TOP_N_SORT operator does not free memory while running > ------------------------------------------------------ > > Key: DRILL-5755 > URL: https://issues.apache.org/jira/browse/DRILL-5755 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Relational Operators > Affects Versions: 1.11.0 > Reporter: Boaz Ben-Zvi > Assignee: Timothy Farkas > Priority: Blocker > Attachments: 2658c253-20b6-db90-362a-139aae4a327e.sys.drill > > > The TOP_N_SORT operator should keep the top N rows while processing its input, and free the memory used to hold all rows below the top N. > For example, the following query uses a table with 125M rows: > {code} > select row_count, sum(row_count), avg(double_field), max(double_rand), count(float_rand) from dfs.`/data/tmp` group by row_count order by row_count limit 30; > {code} > And failed with an OOM when each of the 3 TOP_N_SORT operators was holding about 2.44 GB !! (see attached profile). It should take far less memory to hold 30 rows !! -- This message was sent by Atlassian JIRA (v6.4.14#64029)