[jira] [Comment Edited] (IGNITE-21136) SQL: implement functions for date/time formatting
[ https://issues.apache.org/jira/browse/IGNITE-21136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838071#comment-17838071 ] Pavel Pereslegin edited comment on IGNITE-21136 at 4/17/24 9:51 AM: We need to investigate if we can support setting FORMAT TEMPLATE using a dynamic parameter. If we can’t or it’s extremely complicated, then it is still worth to enable the {{TO_CHAR}} (and {{TO_TIMESTAMP}}) function. Example of sql logic test for to_char function https://gist.github.com/xtern/bc9050cce469565ca4ba5b8c3a623c92 was (Author: xtern): We need to investigate if we can support setting FORMAT TEMPLATE using a dynamic parameter. If we can’t or it’s extremely complicated, then it is still recommended to add the TO_CHAR (and TO_TIMESTAMP) function. Example of sql logic test for to_char function https://gist.github.com/xtern/bc9050cce469565ca4ba5b8c3a623c92 > SQL: implement functions for date/time formatting > - > > Key: IGNITE-21136 > URL: https://issues.apache.org/jira/browse/IGNITE-21136 > Project: Ignite > Issue Type: Improvement > Components: sql >Affects Versions: 3.0.0-beta2 >Reporter: Andrey Khitrin >Priority: Major > Labels: ignite-3, sql > > SQL functions for date/time formatting are useful in many cases. In AI2, we > have an universal FORMATDATETIME function for such purposes: > {code:sql} > SELECT FORMATDATETIME(CREATION_DATE, '-MM') AS CREATION_MONTH FROM ... > {code} > Please imlpement simliar functions in AI3. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (IGNITE-21136) SQL: implement functions for date/time formatting
[ https://issues.apache.org/jira/browse/IGNITE-21136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838071#comment-17838071 ] Pavel Pereslegin edited comment on IGNITE-21136 at 4/17/24 9:59 AM: We need to investigate if we can support setting FORMAT TEMPLATE using a dynamic parameter. If we can’t or it’s extremely complicated, then it is still worth to enable the {{TO_CHAR}} (and {{TO_TIMESTAMP}}) function. Example of sql logic test for to_char function https://gist.github.com/xtern/bc9050cce469565ca4ba5b8c3a623c92 (anyway it worth to wait calcite 1.37, because currently {{TO_CHAR}} produces invalid results for some cases, see CALCITE-6252) was (Author: xtern): We need to investigate if we can support setting FORMAT TEMPLATE using a dynamic parameter. If we can’t or it’s extremely complicated, then it is still worth to enable the {{TO_CHAR}} (and {{TO_TIMESTAMP}}) function. Example of sql logic test for to_char function https://gist.github.com/xtern/bc9050cce469565ca4ba5b8c3a623c92 (anyway it worth to wait calcite 1.37, because currently this function works incorrectly for some cases see CALCITE-6252) > SQL: implement functions for date/time formatting > - > > Key: IGNITE-21136 > URL: https://issues.apache.org/jira/browse/IGNITE-21136 > Project: Ignite > Issue Type: Improvement > Components: sql >Affects Versions: 3.0.0-beta2 >Reporter: Andrey Khitrin >Priority: Major > Labels: ignite-3, sql > > SQL functions for date/time formatting are useful in many cases. In AI2, we > have an universal FORMATDATETIME function for such purposes: > {code:sql} > SELECT FORMATDATETIME(CREATION_DATE, '-MM') AS CREATION_MONTH FROM ... > {code} > Please imlpement simliar functions in AI3. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (IGNITE-21136) SQL: implement functions for date/time formatting
[ https://issues.apache.org/jira/browse/IGNITE-21136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838071#comment-17838071 ] Pavel Pereslegin edited comment on IGNITE-21136 at 4/17/24 9:57 AM: We need to investigate if we can support setting FORMAT TEMPLATE using a dynamic parameter. If we can’t or it’s extremely complicated, then it is still worth to enable the {{TO_CHAR}} (and {{TO_TIMESTAMP}}) function. Example of sql logic test for to_char function https://gist.github.com/xtern/bc9050cce469565ca4ba5b8c3a623c92 (anyway it worth to wait calcite 1.37, because currently this function works incorrectly for some cases see CALCITE-6252) was (Author: xtern): We need to investigate if we can support setting FORMAT TEMPLATE using a dynamic parameter. If we can’t or it’s extremely complicated, then it is still worth to enable the {{TO_CHAR}} (and {{TO_TIMESTAMP}}) function. Example of sql logic test for to_char function https://gist.github.com/xtern/bc9050cce469565ca4ba5b8c3a623c92 > SQL: implement functions for date/time formatting > - > > Key: IGNITE-21136 > URL: https://issues.apache.org/jira/browse/IGNITE-21136 > Project: Ignite > Issue Type: Improvement > Components: sql >Affects Versions: 3.0.0-beta2 >Reporter: Andrey Khitrin >Priority: Major > Labels: ignite-3, sql > > SQL functions for date/time formatting are useful in many cases. In AI2, we > have an universal FORMATDATETIME function for such purposes: > {code:sql} > SELECT FORMATDATETIME(CREATION_DATE, '-MM') AS CREATION_MONTH FROM ... > {code} > Please imlpement simliar functions in AI3. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (IGNITE-21136) SQL: implement functions for date/time formatting
[ https://issues.apache.org/jira/browse/IGNITE-21136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17837158#comment-17837158 ] Pavel Pereslegin edited comment on IGNITE-21136 at 4/15/24 10:07 AM: - Looks like it's worth waiting for the next release of Calcite (1.37.0). Because the FORMAT clause of the CAST operator is implemented there according to SQL:2016 spec (CALCITE-2980). was (Author: xtern): Looks like it's worth waiting for the next release of Calcite (1.37.0). Because the FORMAT clause of the CAST operator is implemented there (CALCITE-2980). > SQL: implement functions for date/time formatting > - > > Key: IGNITE-21136 > URL: https://issues.apache.org/jira/browse/IGNITE-21136 > Project: Ignite > Issue Type: Improvement > Components: sql >Affects Versions: 3.0.0-beta2 >Reporter: Andrey Khitrin >Priority: Major > Labels: ignite-3, sql > > SQL functions for date/time formatting are useful in many cases. In AI2, we > have an universal FORMATDATETIME function for such purposes: > {code:sql} > SELECT FORMATDATETIME(CREATION_DATE, '-MM') AS CREATION_MONTH FROM ... > {code} > Please imlpement simliar functions in AI3. -- This message was sent by Atlassian Jira (v8.20.10#820010)