[
https://issues.apache.org/jira/browse/CALCITE-6311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17846738#comment-17846738
]
Norman Jordan commented on CALCITE-6311:
----------------------------------------
Looking into this, it appears that RedShift and PostgreSQL differ in what is
expected for the first argument.
*RedShift*
* Can be a string or an identifier for the date component
* Unique fields: quarters, day of week
*PostgreSQL*
* Must be a string
* Unique fields: dow
The current implementation is targeted at RedShift and only supports
identifiers. It will need to be split to match RedShift and PostgreSQL
behaviour.
> Support PostgreSQL DATE_PART
> ----------------------------
>
> Key: CALCITE-6311
> URL: https://issues.apache.org/jira/browse/CALCITE-6311
> Project: Calcite
> Issue Type: Sub-task
> Reporter: James Duong
> Assignee: Norman Jordan
> Priority: Minor
>
> * PostgreSQL and Redshift let the date_part parameter be a string instead of
> a just an enum-like identifier (eg DATE_PART('year', ...) and DATE_PART(year,
> ...) are both supported.
> * SQL Server does not support using a string here.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)