[jira] [Commented] (CALCITE-5357) Implement BigQuery FORMAT_TIMESTAMP, FORMAT_DATE

2023-02-24 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-5357:
--

Glad you approve. I'll go ahead and merge.

I think you should create a ticket stating the high-level goal, which is to be 
able to translate a formatting function (say TO_CHAR(orderDate, '') to any 
given dialect (say BigQuery). The work to parse format strings, translate them, 
and re-assemble format strings in the new dialect, will follow from that goal. 
It's related to CALCITE-2980 but only indirectly; it's more naturally a JDBC 
adapter feature.

> Implement BigQuery FORMAT_TIMESTAMP, FORMAT_DATE
> 
>
> Key: CALCITE-5357
> URL: https://issues.apache.org/jira/browse/CALCITE-5357
> Project: Calcite
>  Issue Type: Sub-task
>  Components: core
>Reporter: TJ Banghart
>Assignee: TJ Banghart
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 6h
>  Remaining Estimate: 0h
>




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


[jira] [Commented] (CALCITE-5357) Implement BigQuery FORMAT_TIMESTAMP, FORMAT_DATE

2023-02-24 Thread TJ Banghart (Jira)


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

TJ Banghart commented on CALCITE-5357:
--

[~julianhyde] those changes look great - thank you for taking the time to 
review and fix up the PR! I think the next step is allowing for these format 
functions to be unparsed in the target SQL dialect. I can create a new ticket 
off of  [CALCITE-2980|https://issues.apache.org/jira/browse/CALCITE-2980] if 
that sounds good.

> Implement BigQuery FORMAT_TIMESTAMP, FORMAT_DATE
> 
>
> Key: CALCITE-5357
> URL: https://issues.apache.org/jira/browse/CALCITE-5357
> Project: Calcite
>  Issue Type: Sub-task
>  Components: core
>Reporter: TJ Banghart
>Assignee: TJ Banghart
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 6h
>  Remaining Estimate: 0h
>




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


[jira] [Commented] (CALCITE-5357) Implement BigQuery FORMAT_TIMESTAMP, FORMAT_DATE

2023-02-24 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-5357:
--

[~tjbanghart], I have reviewed your PR 3034 and it looks good. I have made some 
further edits - fix a threading issue by introducing a ThreadLocal, enable the 
relevant tests in big-query.iq, convert FormatModel into an interface, convert 
FormatModels into a utility class, and use SqlBasicFunction instead of 
SqlBigQueryFormatDatetimeFuncton - which you can see in 
[julianhyde/2980-cast-format|https://github.com/julianhyde/calcite/tree/2980-cast-format].
 If those changes look OK I'll squash, rebase, merge.

> Implement BigQuery FORMAT_TIMESTAMP, FORMAT_DATE
> 
>
> Key: CALCITE-5357
> URL: https://issues.apache.org/jira/browse/CALCITE-5357
> Project: Calcite
>  Issue Type: Sub-task
>  Components: core
>Reporter: TJ Banghart
>Assignee: TJ Banghart
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 6h
>  Remaining Estimate: 0h
>




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


[jira] [Commented] (CALCITE-5357) Implement BigQuery FORMAT_TIMESTAMP, FORMAT_DATE

2023-01-04 Thread TJ Banghart (Jira)


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

TJ Banghart commented on CALCITE-5357:
--

For me it makes sense to work on 
[CALCITE-2980|https://issues.apache.org/jira/browse/CALCITE-2980] first. We 
could then use the general format utils to address this and similar issues such 
as [CALCITE-2919|https://issues.apache.org/jira/browse/CALCITE-2919]

> Implement BigQuery FORMAT_TIMESTAMP, FORMAT_DATE
> 
>
> Key: CALCITE-5357
> URL: https://issues.apache.org/jira/browse/CALCITE-5357
> Project: Calcite
>  Issue Type: Sub-task
>  Components: core
>Reporter: TJ Banghart
>Assignee: TJ Banghart
>Priority: Major
>




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