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

Yu Xu reassigned CALCITE-5406:
------------------------------

    Assignee: Yu Xu  (was: Zhengqiang Duan)

> 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: Yu Xu
>            Priority: Major
>              Labels: pull-request-available
>
> 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)

Reply via email to