phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-2930) Cannot resolve columns aliased to its own name
Date Thu, 02 Jun 2016 15:20:59 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Taylor updated PHOENIX-2930:
----------------------------------
    Fix Version/s: 4.8.0

> 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
>              Labels: alias
>             Fix For: 4.8.0
>
>
> 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¨
> ðjava.lang.RuntimeException: org.apache.phoenix.schema.AmbiguousColumnException:
ERROR 502 (42702): Column reference ambiguous or duplicate names. columnName=PK
> 	at org.apache.calcite.avatica.jdbc.JdbcMeta.propagate(JdbcMeta.java:671)
> 	at org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:695)
> 	at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:208)
> 	at org.apache.calcite.avatica.remote.Service$PrepareRequest.accept(Service.java:1157)
> 	at org.apache.calcite.avatica.remote.Service$PrepareRequest.accept(Service.java:1131)
> 	at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:95)
> 	at org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:46)
> 	at org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:127)
> 	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:499)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
> 	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.phoenix.schema.AmbiguousColumnException: ERROR 502 (42702): Column
reference ambiguous or duplicate names. columnName=PK
> 	at org.apache.phoenix.parse.ParseNodeRewriter.visit(ParseNodeRewriter.java:406)
> 	at org.apache.phoenix.compile.StatementNormalizer.visit(StatementNormalizer.java:177)
> 	at org.apache.phoenix.compile.StatementNormalizer.visit(StatementNormalizer.java:58)
> 	at org.apache.phoenix.parse.ColumnParseNode.accept(ColumnParseNode.java:56)
> 	at org.apache.phoenix.parse.ParseNodeRewriter.rewrite(ParseNodeRewriter.java:111)
> 	at org.apache.phoenix.compile.StatementNormalizer.normalize(StatementNormalizer.java:107)
> 	at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:398)
> 	at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:378)
> 	at org.apache.phoenix.jdbc.PhoenixPreparedStatement.getMetaData(PhoenixPreparedStatement.java:223)
> 	at org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:689)
> 	... 15 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message