Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 18462 invoked from network); 19 Dec 2007 11:02:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2007 11:02:22 -0000 Received: (qmail 61649 invoked by uid 500); 19 Dec 2007 11:02:10 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 61626 invoked by uid 500); 19 Dec 2007 11:02:10 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 61615 invoked by uid 99); 19 Dec 2007 11:02:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 03:02:10 -0800 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.24] (HELO gmp-eb-mail-2.sun.com) (192.18.6.24) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 11:01:45 +0000 Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe1.eu.sun.com [192.18.6.10]) by gmp-eb-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id lBJB1jYE004018 for ; Wed, 19 Dec 2007 11:01:47 GMT Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JTA00D01LYJ6500@fe-emea-10.sun.com> (original mail from Thomas.Nielsen@Sun.COM) for derby-user@db.apache.org; Wed, 19 Dec 2007 11:01:45 +0000 (GMT) Received: from [129.159.112.233] by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JTA009CDMMTO180@fe-emea-10.sun.com> for derby-user@db.apache.org; Wed, 19 Dec 2007 11:01:42 +0000 (GMT) Date: Wed, 19 Dec 2007 12:01:41 +0100 From: Thomas Nielsen Subject: Re: Double.NaN in table? In-reply-to: <830142bd0712190151s1595d71an89339f1bf8372103@mail.gmail.com> Sender: Thomas.Nielsen@Sun.COM To: Derby Discussion Message-id: <4768FA15.80806@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <419520.95409.qm@web30614.mail.mud.yahoo.com> <639980.73013.qm@web30608.mail.mud.yahoo.com> <830142bd0712182350i7fef1d47le0de72e13a20e5d1@mail.gmail.com> <4768DD9F.3020508@sun.com> <4768E314.4020607@sun.com> <830142bd0712190151s1595d71an89339f1bf8372103@mail.gmail.com> User-Agent: Thunderbird 2.0.0.9 (X11/20071119) X-Virus-Checked: Checked by ClamAV on apache.org Neither the JDBC 4.0 specification[1] nor "JDBC API Tutorial and Reference"[2] mention handling of the NaN or INFINITE numbers at all AFAICT. As there is no mention of how to handle *jdbc* doubles (and literals), it seems this then boils down to how/if the database handle the *sql* double (and literals). Cheers, Thomas [1] JSR-221, JDBC 4.0, http://jcp.org/aboutJava/communityprocess/final/jsr221/index.html [2] "JDBC API Tutorial and Reference, Third Edt.", Fisher, Ellis & Bruce, Addison-Wesley 2003. Andrew ``Bass'' Shcheglov wrote: > On Dec 19, 2007 12:23 PM, Thomas Nielsen wrote: >> Looking at the derby code on the main trunk, I see the exception is >> intentional, as there is an explicit check for NaN values in >> NumberDataType.normalizeDOUBLE(). >> >> Not sure if this is another DB2 compatability issue/limitation or not. >> Maybe someone with deeper knowledge can give more details on this? > > > This is odd, > > for Oracle, for instance, fully supports IEEE 754 (since 10g): > > http://www.oracle.com/technology/sample_code/tutorials/jdbc10g/ieeedatatypes/files/IEEEDatatypes.pdf > http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/sql_elements003.htm -- Thomas Nielsen