You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Danny Chan (JIRA)" <ji...@apache.org> on 2019/08/13 02:35:00 UTC
[jira] [Comment Edited] (CALCITE-3238) Support Time Zone suffix of
DateTime types for SqlDataTypeSpec
[ https://issues.apache.org/jira/browse/CALCITE-3238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16905749#comment-16905749 ]
Danny Chan edited comment on CALCITE-3238 at 8/13/19 2:34 AM:
--------------------------------------------------------------
I agree with your point that we should firstly consider model the grammar first, the difficult thing is that i need to parse the precision/scale between the actual "time/timestamp" and "with local time zone".
I put the parse for all the data types just like the "<CHARACTER> <SET>", which i think also have the same problem.
I will try to do some refactoring, thanks.
was (Author: danny0405):
I agree with your point that we should firstly consider model the grammar first, the difficult thing is that i need to parse the precision/scale between the actually "time/timestamp" and "with local time zone".
I put the parse for all the data types just like the "<CHARACTER> <SET>", which i think also have the same problem.
I will try to do some refactoring, thanks.
> Support Time Zone suffix of DateTime types for SqlDataTypeSpec
> --------------------------------------------------------------
>
> Key: CALCITE-3238
> URL: https://issues.apache.org/jira/browse/CALCITE-3238
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Danny Chan
> Assignee: Danny Chan
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> This is the grammar copied from SQL-2011:
> {code:sql}
> <datetime type> ::=
> DATE
> | TIME [ <left paren> <time precision> <right paren> ] [ <with or without time zone> ]
> | TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
> [ <with or without time zone> ]
> <with or without time zone> ::=
> WITH TIME ZONE
> | WITHOUT TIME ZONE
> <time precision> ::=
> <time fractional seconds precision>
> <timestamp precision> ::=
> <time fractional seconds precision>
> <time fractional seconds precision> ::=
> <unsigned integer>
> {code}
> We extend this grammar to support "with local time zone" definition:
> {code:sql}
> time(0) with local time zone
> timestamp(0) with local time zone
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)