[
https://issues.apache.org/jira/browse/PHOENIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15090013#comment-15090013
]
Ziyang Zhao edited comment on PHOENIX-2579 at 1/8/16 10:38 PM:
---------------------------------------------------------------
[~maryannxue] I am testing Tableau connect to Phoenix via ODBC. Tableau
translate every customer query, for example:
select * from testtable
to a subquery
SELECT "Custom_SQL_Query"."NUM" AS "NUM"
FROM (
select * from testtable
) "Custom_SQL_Query"
"Custom sql" is a very popular feature in Tableau, users use it all the time.
And there seems to be no way to configure Tableau from generate the alias.
So we really appreciate it if you can fix this bug.
was (Author: ziyangz):
[~maryannxue] I am testing Tableau connect to Phoenix via ODBC. Tableau
translate every customer query, for example:
select * from testtable
to a subquery
SELECT "Custom_SQL_Query"."NUM" AS "NUM"
FROM (
select * from testtable
) "Custom_SQL_Query"
So please fix it.
> Subquery with alias does not work
> ---------------------------------
>
> Key: PHOENIX-2579
> URL: https://issues.apache.org/jira/browse/PHOENIX-2579
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.4.0, 4.6.0, 4.5.2
> Reporter: Ziyang Zhao
>
> Used a table without schema and without catalog
> table name: TESTTABLE
> num (DECIMAL(12, 2))
> 100.25
> 200.25
> 300.25
> 400.25
> Did a query:
> select A.num from (select * from testtable) A;
> And got the following error messages:
> Error: error while executing SQL "select A.col3 from (select * from
> T3CODEBASE_TABLE) A": response code 500 (state=,code=0)
> java.sql.SQLException: error while executing SQL "select A.col3 from (select
> * from T3CODEBASE_TABLE) A": response code 500
> at org.apache.calcite.avatica.Helper.createException(Helper.java:39)
> at
> org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:111)
> at
> org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:120)
> at sqlline.Commands.execute(Commands.java:822)
> at sqlline.Commands.sql(Commands.java:732)
> at sqlline.SqlLine.dispatch(SqlLine.java:808)
> at sqlline.SqlLine.begin(SqlLine.java:681)
> at sqlline.SqlLine.start(SqlLine.java:398)
> at sqlline.SqlLine.main(SqlLine.java:292)
> Caused by: java.lang.RuntimeException: response code 500
> at
> org.apache.calcite.avatica.remote.RemoteService.apply(RemoteService.java:45)
> at
> org.apache.calcite.avatica.remote.JsonService.apply(JsonService.java:195)
> at
> org.apache.calcite.avatica.remote.RemoteMeta.prepareAndExecute(RemoteMeta.java:157)
> at
> org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:474)
> at
> org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:108)
> ... 7 more
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)