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 E7CA8200B3C for ; Tue, 7 Jun 2016 01:27:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E62A8160A24; Mon, 6 Jun 2016 23:27:22 +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 3D68B160A55 for ; Tue, 7 Jun 2016 01:27:22 +0200 (CEST) Received: (qmail 10023 invoked by uid 500); 6 Jun 2016 23:27:21 -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 9866 invoked by uid 99); 6 Jun 2016 23:27:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2016 23:27:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 22F8F2C1F62 for ; Mon, 6 Jun 2016 23:27:21 +0000 (UTC) Date: Mon, 6 Jun 2016 23:27:21 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4707) Conflicting columns names under case-insensitive policy lead to either memory leak or incorrect result MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 06 Jun 2016 23:27:23 -0000 [ https://issues.apache.org/jira/browse/DRILL-4707?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1531= 7479#comment-15317479 ]=20 ASF GitHub Bot commented on DRILL-4707: --------------------------------------- GitHub user jinfengni opened a pull request: https://github.com/apache/drill/pull/515 DRILL-4707: Fix memory leak or incorrect query result in case two col= =E2=80=A6 =E2=80=A6umn names are case-insensitive identical =20 Fix is mainly in CALCITE-528. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jinfengni/incubator-drill DRILL-4707 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/515.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #515 =20 ---- commit 1bab184e862be5baa5f47804f506bdb56b35b374 Author: Jinfeng Ni Date: 2016-06-06T00:37:22Z DRILL-4707: Fix memory leak or incorrect query result in case two colum= n names are case-insensitive identical =20 Fix is mainly in CALCITE-528. ---- > Conflicting columns names under case-insensitive policy lead to either me= mory leak or incorrect result > -------------------------------------------------------------------------= ----------------------------- > > Key: DRILL-4707 > URL: https://issues.apache.org/jira/browse/DRILL-4707 > Project: Apache Drill > Issue Type: Bug > Reporter: Jinfeng Ni > Assignee: Jinfeng Ni > Priority: Critical > > On latest master branch: > {code} > select version, commit_id, commit_message from sys.version; > +-----------------+-------------------------------------------+----------= -----------------------------------------------------------------------+ > | version | commit_id | = commit_message | > +-----------------+-------------------------------------------+----------= -----------------------------------------------------------------------+ > | 1.7.0-SNAPSHOT | 3186217e5abe3c6c2c7e504cdb695567ff577e4c | DRILL-460= 7: Add a split function that allows to separate string by a delimiter | > +-----------------+-------------------------------------------+----------= -----------------------------------------------------------------------+ > {code} > If a query has two conflicting column names under case-insensitive policy= , Drill will either hit memory leak, or incorrect issue. > Q1. > {code} > select r_regionkey as XYZ, r_name as xyz FROM cp.`tpch/region.parquet`; > Error: SYSTEM ERROR: IllegalStateException: Memory was leaked by query. M= emory leaked: (131072) > Allocator(op:0:0:1:Project) 1000000/131072/2490368/10000000000 (res/actua= l/peak/limit) > Fragment 0:0 > {code} > Q2: return only one column in the result.=20 > {code} > select n_nationkey as XYZ, n_regionkey as xyz FROM cp.`tpch/nation.parque= t`; > +------+ > | XYZ | > +------+ > | 0 | > | 1 | > | 1 | > | 1 | > | 4 | > | 0 | > | 3 | > {code} > The cause of the problem seems to be that the Project thinks the two inco= ming columns as identical (since Drill adopts case-insensitive for column n= ames in execution).=20 > The planner should make sure that the conflicting columns are resolved, s= ince execution is name-based.=20 -- This message was sent by Atlassian JIRA (v6.3.4#6332)