[
https://issues.apache.org/jira/browse/CALCITE-6542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiong duan updated CALCITE-6542:
--------------------------------
Description:
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}
Column name is different, PG is avg, H
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.
was:
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}
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.
> 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}
> Column name is different, PG is avg, H
> 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)