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

ASF GitHub Bot commented on CALCITE-2299:
-----------------------------------------

GitHub user snuyanzin opened a pull request:

    https://github.com/apache/calcite-avatica/pull/60

    [CALCITE-2299] TIMESTAMPADD(SQL_TSI_FRAC_SECOND) should be nanoseconds

    [CALCITE-2299] Avatica part
    added tests for TimeUnitRange, TimeUnit including for newly added 
NANOSECOND TimeUnit in CALCITE-2299

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/snuyanzin/calcite-avatica CALCITE_AVATICA_2299

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/calcite-avatica/pull/60.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #60
    
----
commit d2fe74ba0a12529f6b17614f54c7e69c7826b131
Author: snuyanzin <snuyanzin@...>
Date:   2018-06-14T13:48:47Z

    [CALCITE-2299] TIMESTAMPADD(SQL_TSI_FRAC_SECOND) should be nanoseconds not 
microseconds
    Added support of nanoseconds in TimeUnit and TimeUnitRange

commit 536577758ef583ddab4fbb6619af8afd01a075f3
Author: snuyanzin <snuyanzin@...>
Date:   2018-06-14T20:47:59Z

    [CALCITE-2299] TIMESTAMPADD(SQL_TSI_FRAC_SECOND) should be nanoseconds
    Added tests in Avatica for TimeUnitRange

----


> TIMESTAMPADD(SQL_TSI_FRAC_SECOND) should be nanoseconds not microseconds
> ------------------------------------------------------------------------
>
>                 Key: CALCITE-2299
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2299
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.16.0
>            Reporter: James Duong
>            Assignee: Julian Hyde
>            Priority: Minor
>             Fix For: avatica-1.12.0
>
>
> When calling TIMESTAMPADD with the first parameter SQL_TSI_FRAC_SECOND and 
> the JDBC escape sequence, this gets interpreted as microseconds when it 
> should be interpreted as nanoseconds.
>  
> From the ODBC spec on MSDN:
> [https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/time-date-and-interval-functions?view=sql-server-2017]
> 'where fractional seconds are expressed in billionths of a second.'



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to