You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/04/08 04:17:00 UTC

[jira] [Comment Edited] (CALCITE-5619) Support PostgreSQL's TO_CHAR function

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

Julian Hyde edited comment on CALCITE-5619 at 4/8/23 4:16 AM:
--------------------------------------------------------------

The PR looks good. Can you explain why it was necessarily to change Locale.ROOT to Locale.US?

[~dmsysolyatin], before you merge could you change the commit message to make clear that it only works for TIMESTAMP. (Oracle has variants for DATE, number etc.) and which libraries it is enabled in. Follow the format of other recent commits that added functions.


was (Author: julianhyde):
The PR looks good. [~dmsysolyatin], before you merge could you change the commit message to make clear that it only works for TIMESTAMP. (Oracle has variants for DATE, number etc.) and which libraries it is enabled in. Follow the format of other recent commits that added functions.

> Support PostgreSQL's TO_CHAR function
> -------------------------------------
>
>                 Key: CALCITE-5619
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5619
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tim Nieradzik
>            Assignee: Tim Nieradzik
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.35.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> PostgreSQL has three to_char() functions:
> {{to_char ( timestamp, text ) → text}}
> {{to_char ( interval, text ) → text}}
> {{to_char ( numeric_type, text ) → text}}
> The following query cannot be parsed because the first to_char() function is not supported:
> {{select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI:SS.MS TZ')}}



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