[
https://issues.apache.org/jira/browse/CALCITE-1659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884724#comment-15884724
]
Remus Rusanu edited comment on CALCITE-1659 at 2/26/17 11:44 AM:
-----------------------------------------------------------------
Looks like there is a disagreement here between timestmap {{scale}} vs.
{{precision}}. In {{RexBuilder.makeCast}} the type scale is inspected. However,
all default TIMESTMAP type system uses the precision (default 9) and does not
specify the scale, as far as I can tell. I also looked at the standard and I
did not find mention of scale vis-a-vis timestamps, only precision.
was (Author: rusanu):
Looks like there is a disagreement here between timestmap {{scale}} vs.
{{precission}}. In {{RexBuilder.makeCast}} the type scale is inspected.
However, all default TIMESTMAP type system uses the precision (default 9) and
does not specify the scale, as far as I can tell. I also looked at the standard
and I did not find mention of scale vis-a-vis timestamps, only precision.
> Timestamps are loosing sub-second parts after Calcite literal constant
> reduction
> --------------------------------------------------------------------------------
>
> Key: CALCITE-1659
> URL: https://issues.apache.org/jira/browse/CALCITE-1659
> Project: Calcite
> Issue Type: Bug
> Reporter: Remus Rusanu
> Assignee: Julian Hyde
>
> {noformat}
> select cast("1970-12-31 15:59:58.174" as TIMESTAMP) from src limit 1;
> {noformat}
> yields {{1970-12-31 15:59:58}} if CBO is enabled in Hive.
> {{ZonelessTimestamp.toString()}} contains a truncation 0-19 (ie. removes
> sub-second part from string representation).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)