[ 
https://issues.apache.org/jira/browse/CALCITE-6542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18089847#comment-18089847
 ] 

Yu Xu commented on CALCITE-6542:
--------------------------------

I believe this requirement has value in terms of unified SQL presentation, so I 
take it first.

> Jdbc adapter support use a unified alias when generating SQL
> ------------------------------------------------------------
>
>                 Key: CALCITE-6542
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6542
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: xiong duan
>            Priority: Major
>
> For example:
> Postgresql:
> {code:java}
> select avg(1) from table;{code}
> {code:java}
> +---+
> |avg|
> +---+
> |1  |
> +---+{code}
> HSQLDB:
> {code:java}
> select avg(1) from table;{code}
> {code:java}
> +---+
> |C1 |
> +---+
> |1  |
> +---+{code}
> The column name is different, PG is avg and HSQLDB is C1.
> When I use Calcite to query different databases and don't want users to 
> notice the difference, I want to add a configuration in SqlDialect to support 
> generating a unified name.
> When the configuration is open, generate SQL will be:
> {code:java}
> select svg(1) as EXPR$0 from table;{code}
> This issue needs to be evaluated to determine whether it is reasonable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to