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 3707A200B85 for ; Thu, 15 Sep 2016 09:08:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2CD88160AD7; Thu, 15 Sep 2016 07:08:23 +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 742E0160AB5 for ; Thu, 15 Sep 2016 09:08:22 +0200 (CEST) Received: (qmail 48409 invoked by uid 500); 15 Sep 2016 07:08:20 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 48378 invoked by uid 99); 15 Sep 2016 07:08:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Sep 2016 07:08:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 826972C0D57 for ; Thu, 15 Sep 2016 07:08:20 +0000 (UTC) Date: Thu, 15 Sep 2016 07:08:20 +0000 (UTC) From: "Ankit Singhal (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-2930) Cannot resolve columns aliased to its own name MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 15 Sep 2016 07:08:23 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-2930?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15= 492606#comment-15492606 ]=20 Ankit Singhal commented on PHOENIX-2930: ---------------------------------------- [~maryannxue], any idea to fix it in a better way? > Cannot resolve columns aliased to its own name > ---------------------------------------------- > > Key: PHOENIX-2930 > URL: https://issues.apache.org/jira/browse/PHOENIX-2930 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.4.0 > Reporter: Kevin Liew > Assignee: Ankit Singhal > Labels: alias > Fix For: 4.9.0 > > Attachments: PHOENIX-2930.patch > > > Tableau generates queries that alias a fully-qualified column name to its= shortened name. > Similar to: > {code} > create table test (pk integer primary key); > select test.pk as pk from test group by pk; > {code} > Phoenix reports: > {code} > 8org.apache.calcite.avatica.proto.Responses$ErrorResponse=12=C3=82=C2=A8= =16 > =C3=83=C2=B0=13java.lang.RuntimeException: org.apache.phoenix.schema.Ambi= guousColumnException: ERROR 502 (42702): Column reference ambiguous or dupl= icate names. columnName=3DPK > =09at org.apache.calcite.avatica.jdbc.JdbcMeta.propagate(JdbcMeta.java:67= 1) > =09at org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:695) > =09at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.j= ava:208) > =09at org.apache.calcite.avatica.remote.Service$PrepareRequest.accept(Ser= vice.java:1157) > =09at org.apache.calcite.avatica.remote.Service$PrepareRequest.accept(Ser= vice.java:1131) > =09at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHan= dler.java:95) > =09at org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHan= dler.java:46) > =09at org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(Ava= ticaProtobufHandler.java:127) > =09at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.jav= a:52) > =09at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapp= er.java:97) > =09at org.eclipse.jetty.server.Server.handle(Server.java:499) > =09at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) > =09at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.j= ava:257) > =09at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.ja= va:544) > =09at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadP= ool.java:635) > =09at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPo= ol.java:555) > =09at java.lang.Thread.run(Thread.java:745) > Caused by: org.apache.phoenix.schema.AmbiguousColumnException: ERROR 502 = (42702): Column reference ambiguous or duplicate names. columnName=3DPK > =09at org.apache.phoenix.parse.ParseNodeRewriter.visit(ParseNodeRewriter.= java:406) > =09at org.apache.phoenix.compile.StatementNormalizer.visit(StatementNorma= lizer.java:177) > =09at org.apache.phoenix.compile.StatementNormalizer.visit(StatementNorma= lizer.java:58) > =09at org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.jav= a:56) > =09at org.apache.phoenix.parse.ParseNodeRewriter.rewrite(ParseNodeRewrite= r.java:111) > =09at org.apache.phoenix.compile.StatementNormalizer.normalize(StatementN= ormalizer.java:107) > =09at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.= compilePlan(PhoenixStatement.java:398) > =09at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.= compilePlan(PhoenixStatement.java:378) > =09at org.apache.phoenix.jdbc.PhoenixPreparedStatement.getMetaData(Phoeni= xPreparedStatement.java:223) > =09at org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:689) > =09... 15 more > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)