Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 12099 invoked from network); 30 Aug 2010 15:27:34 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Aug 2010 15:27:34 -0000 Received: (qmail 21091 invoked by uid 500); 30 Aug 2010 15:27:33 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 20234 invoked by uid 500); 30 Aug 2010 15:27:32 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 20227 invoked by uid 99); 30 Aug 2010 15:27:32 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 15:27:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 15:27:15 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7UFQrx1008853 for ; Mon, 30 Aug 2010 15:26:53 GMT Message-ID: <23521451.70321283182013768.JavaMail.jira@thor> Date: Mon, 30 Aug 2010 11:26:53 -0400 (EDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4625) TIMESTAMP function doesn't accept nanoseconds In-Reply-To: <32681535.112341271847531633.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904225#action_12904225 ] Knut Anders Hatlen commented on DERBY-4625: ------------------------------------------- Thanks, Nirmal. Perhaps the change in DataTypeUtilities is better to leave out for now to make the impact on the tests smaller. If I understand correctly, it doesn't seem to be strictly necessary for getting the TIMESTAMP function to accept nanoseconds, it helps IJ display the entire value. Maybe that change could be made as part of DERBY-4614 instead? The patch seems to make an unintended change to the license header in SQLTimestamp.java. 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.) It would also be good to have a test case (for example in DateTimeTest) that verifies that the function now accepts nanosecond resolution. > 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: 10.5.3.0 > 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 function. > 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.