Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A51B9102B1 for ; Mon, 19 Jan 2015 06:38:32 +0000 (UTC) Received: (qmail 56045 invoked by uid 500); 19 Jan 2015 06:38:34 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 56015 invoked by uid 500); 19 Jan 2015 06:38:34 -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 56005 invoked by uid 99); 19 Jan 2015 06:38:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jan 2015 06:38:34 +0000 Date: Mon, 19 Jan 2015 06:38:34 +0000 (UTC) From: "Jinfeng Ni (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-2030) CTAS with SELECT * and expression creates column names with prefix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-2030?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1428= 2190#comment-14282190 ]=20 Jinfeng Ni commented on DRILL-2030: ----------------------------------- Thanks for finding this problem. Yes, you are right. The top level project = should be below Writer. Originally, I thought both Screen and Writer could= be root operator; Screen is the root operator for query, while Writer is i= s the root for CTAS. Apparently, later on we decided to put Writer under S= creen, so that Screen could report back the result of CTAS, which broke the= logic of star column handling.=20 I'll submit a patch to fix this issue.=20 =20 > CTAS with SELECT * and expression creates column names with prefix > ------------------------------------------------------------------ > > Key: DRILL-2030 > URL: https://issues.apache.org/jira/browse/DRILL-2030 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 0.7.0 > Reporter: Aman Sinha > Assignee: Jinfeng Ni > > Doing a CTAS with the star column and an expression creates columns that = contain the table prefix 'T||' . Looks like the top project did not strip = out the prefix.=20 > {code} > 0: jdbc:drill:zk=3Dlocal> create table region4 as select *, r_regionkey += 1 from cp.`tpch/region.parquet`; > +------------+---------------------------+ > | Fragment | Number of records written | > +------------+---------------------------+ > | 0_0 | 5 | > +------------+---------------------------+ > 0: jdbc:drill:zk=3Dlocal> select * from region4; > +-----------------+------------+---------------+------------+ > | T2=C2=A6=C2=A6r_regionkey | T2=C2=A6=C2=A6r_name | T2=C2=A6=C2=A6r_comm= ent | EXPR$1 | > +-----------------+------------+---------------+------------+ > {code} > The column names are correct if there is a regular column with the star c= olumn.=20 -- This message was sent by Atlassian JIRA (v6.3.4#6332)