[
https://issues.apache.org/jira/browse/CALCITE-2656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16677121#comment-16677121
]
Wamsi Viswanath commented on CALCITE-2656:
------------------------------------------
TIMESTAMP(6) 'a' gets shimmed to CAST (a as TIMSTAMP(6)). I apologize for the
confusion.
Here is the standard implementation for your reference:
{code:java}
explain calcite select count(*) from test where m_6 = cast('1999-07-11
14:02:53.874533' as TIMESTAMP(6));
Explanation
LogicalAggregate(group=[{}], EXPR$0=[COUNT()])
LogicalProject($f0=[0])
LogicalFilter(condition=[=($18, CAST('1999-07-11
14:02:53.874533'):TIMESTAMP(6) NOT NULL)])
EnumerableTableScan(table=[[mapd, test]])
{code}
> Timestamp Micro and Nano Strings literals are getting rounded to milliseconds
> ------------------------------------------------------------------------------
>
> Key: CALCITE-2656
> URL: https://issues.apache.org/jira/browse/CALCITE-2656
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.16.0
> Reporter: Wamsi Viswanath
> Assignee: Julian Hyde
> Priority: Major
>
> explain calcite select m_6 = cast( '1999-07-11 14:02:53.874533' as
> TIMESTAMP(6)) from test;
> Explanation
> LogicalProject(EXPR$0=[=($18, 1999-07-11 14:02:53.875)])
> EnumerableTableScan(table=[[mapd, test]])
>
> Please let me know if this is an expected behavior ? Thank you!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)