db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C.S. Nirmal J. Fernando (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4625) TIMESTAMP function doesn't accept nanoseconds
Date Wed, 01 Sep 2010 19:15:54 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905167#action_12905167

C.S. Nirmal J. Fernando commented on DERBY-4625:

Hi Knut,

Thanks for reviewing the patch.

>The constant SQLTimestamp.FRACTION_TO_NANO is used in SQLChar.setValue(Timestamp,Calendar).
I think changing it from 1000 to 1 may make the calculations in >SQLChar become wrong.
(If we fix DERBY-4626 that code will probably go away, though.) 

Without changing 1000 to 1 we can't get the expected result. I am wondering whether there
are test cases which is addressed this setValue(..) function. If so since I did not find any
regression failures regarding that, can't we conclude that the calculations of SQLChar are
still correct?


> TIMESTAMP function doesn't accept nanoseconds
> ---------------------------------------------
>                 Key: DERBY-4625
>                 URL: https://issues.apache.org/jira/browse/DERBY-4625
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>            Priority: Minor
>         Attachments: derby-4625-1.diff
> The TIMESTAMP function fails if the string argument specifies the number of nanoseconds.
It works if the argument is limited to microsecond resolution.
> ij> values timestamp('2010-04-21 12:00:00.123456');
> 1                         
> --------------------------
> 2010-04-21 12:00:00.123456
> 1 row selected
> ij> values timestamp('2010-04-21 12:00:00.123456789');
> ERROR 22008: '2010-04-21 12:00:00.123456789' is an invalid argument to the timestamp
> Since Derby (and JDBC) supports nanosecond resolution, the TIMESTAMP function should
also support it.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message