[
https://issues.apache.org/jira/browse/CALCITE-5406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zhengqiang Duan updated CALCITE-5406:
-------------------------------------
Description:
Hi, community, I am currently using Calcite to help ShardingSphere implement
distributed database features. When we tested the SELECT DISTINCT ON statement
in PostgreSQL(as shown in the following sql), we found that Calcite currently
does not support the parsing and semantic processing of the SELECT DISTINCT ON
statement. Considering that the SELECT DISTINCT ON statement in PostgreSQL is
frequently used and valuable to users, we hope to support this new feature.
{code:java}
select distinct on (user_id) * from t_order order by user_id, order_id; {code}
As suggested by [~asolimando] and [~julianhyde] , first, we need to support
SELECT DISTINCT ON statement parsing at PostgreSQL and lenient compliance level.
Secondly, we need to investigate whether we need to rewrite in
SqlToRelConverter or in planner rules?
I will investigate the solution to support this new feature and update it in
jira later.
was:
Hi, community, I am currently using Calcite to help ShardingSphere implement
distributed database features. When we tested the SELECT DISTINCT ON statement
in PostgreSQL(as shown in the following sql), we found that Calcite currently
does not support the parsing and semantic processing of the SELECT DISTINCT ON
statement. Considering that the SELECT DISTINCT ON statement in PostgreSQL is
frequently used and valuable to users, we hope to support this new feature.
{code:java}
select distinct on (user_id) * from t_order order by user_id, order_id; {code}
> Support the SELECT DISTINCT ON statement for PostgreSQL dialect
> ---------------------------------------------------------------
>
> Key: CALCITE-5406
> URL: https://issues.apache.org/jira/browse/CALCITE-5406
> Project: Calcite
> Issue Type: New Feature
> Affects Versions: 1.32.0
> Reporter: Zhengqiang Duan
> Assignee: Zhengqiang Duan
> Priority: Major
>
> Hi, community, I am currently using Calcite to help ShardingSphere implement
> distributed database features. When we tested the SELECT DISTINCT ON
> statement in PostgreSQL(as shown in the following sql), we found that Calcite
> currently does not support the parsing and semantic processing of the SELECT
> DISTINCT ON statement. Considering that the SELECT DISTINCT ON statement in
> PostgreSQL is frequently used and valuable to users, we hope to support this
> new feature.
> {code:java}
> select distinct on (user_id) * from t_order order by user_id, order_id; {code}
> As suggested by [~asolimando] and [~julianhyde] , first, we need to support
> SELECT DISTINCT ON statement parsing at PostgreSQL and lenient compliance
> level.
> Secondly, we need to investigate whether we need to rewrite in
> SqlToRelConverter or in planner rules?
> I will investigate the solution to support this new feature and update it in
> jira later.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)