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 E185D200B32 for ; Thu, 9 Jun 2016 02:37:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E0327160A35; Thu, 9 Jun 2016 00:37: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 3CBE9160A54 for ; Thu, 9 Jun 2016 02:37:22 +0200 (CEST) Received: (qmail 85026 invoked by uid 500); 9 Jun 2016 00:37: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 85004 invoked by uid 99); 9 Jun 2016 00:37:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jun 2016 00:37:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1BB3C2C1F60 for ; Thu, 9 Jun 2016 00:37:21 +0000 (UTC) Date: Thu, 9 Jun 2016 00:37:21 +0000 (UTC) From: "Robert Hou (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: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 09 Jun 2016 00:37:23 -0000 [ https://issues.apache.org/jira/browse/DRILL-4707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15321712#comment-15321712 ] Robert Hou commented on DRILL-4707: ----------------------------------- Here is another query: SELECT s.student_id as student, s.name as StudenT, s.gpa as StudenT from student s join hive.alltypesp1 h on (s.student_id = h.c1); Error: SYSTEM ERROR: IllegalStateException: Failure while reading vector. Expected vector class of org.apache.drill.exec.vector.NullableVarBinaryVector but was holding vector class org.apache.drill.exec.vector.NullableFloat8Vector, field= StudenT0(FLOAT8:OPTIONAL) student_id is an integer name is a varchar gpa is a double c1 is an integer 0: jdbc:drill:zk=10.10.100.186:5181> select version, commit_id, commit_message from sys.version; +-----------------+-------------------------------------------+--------------------------------------------+ | version | commit_id | commit_message | +-----------------+-------------------------------------------+--------------------------------------------+ | 1.7.0-SNAPSHOT | a07f4de7e8725f7971ace308e81a241b7b07b5b6 | DRILL-3522: Fix for sporadic Mongo errors | +-----------------+-------------------------------------------+--------------------------------------------+ > Conflicting columns names under case-insensitive policy lead to either memory 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-4607: 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. Memory leaked: (131072) > Allocator(op:0:0:1:Project) 1000000/131072/2490368/10000000000 (res/actual/peak/limit) > Fragment 0:0 > {code} > Q2: return only one column in the result. > {code} > select n_nationkey as XYZ, n_regionkey as xyz FROM cp.`tpch/nation.parquet`; > +------+ > | XYZ | > +------+ > | 0 | > | 1 | > | 1 | > | 1 | > | 4 | > | 0 | > | 3 | > {code} > The cause of the problem seems to be that the Project thinks the two incoming columns as identical (since Drill adopts case-insensitive for column names in execution). > The planner should make sure that the conflicting columns are resolved, since execution is name-based. -- This message was sent by Atlassian JIRA (v6.3.4#6332)