Proposal for Decimal64 and Decimal128 value-based classes
Douglas Surber
douglas.surber at oracle.com
Wed Mar 31 14:23:43 UTC 2021
+1
JDBC would support this immediately. All it would take is the addition of a couple of lines in some appendices to require that conforming implementations of getObject(int, Class), setObject(int, Object, SQLType), etc support Decimal64 and Decimal128. No change to the API required. Driver vendors could add this support the instant the types are available, no need to wait for a change in the JDBC spec.
This would be a huge win for many Java apps. A large fraction of Java apps deal with money in some form. Binary floats are inappropriate for money and BigDecimal is too big and too slow.
Rather than waiting on Valhala I would prefer that this project be fast tracked and added to OpenJDK ASAP.
Thanks for doing this.
Douglas
On Mar 30, 2021, at 10:10 PM, core-libs-dev-request at openjdk.java.net<mailto:core-libs-dev-request at openjdk.java.net> wrote:
Date: Tue, 30 Mar 2021 22:12:32 -0400
From: Brian Goetz <brian.goetz at oracle.com<mailto:brian.goetz at oracle.com>>
To: Raffaello Giulietti <raffaello.giulietti at gmail.com<mailto:raffaello.giulietti at gmail.com>>, Paul Sandoz
<paul.sandoz at oracle.com<mailto:paul.sandoz at oracle.com>>
Cc: core-libs-dev <core-libs-dev at openjdk.java.net<mailto:core-libs-dev at openjdk.java.net>>
Subject: Re: Proposal for Decimal64 and Decimal128 value-based classes
Message-ID: <64334a24-0e4c-57b8-b666-447ca3508ce5 at oracle.com<mailto:64334a24-0e4c-57b8-b666-447ca3508ce5 at oracle.com>>
Content-Type: text/plain; charset=utf-8; format=flowed
They'll find a natural home in JDBC, since SQL has a native decimal type.
On 3/30/2021 7:05 PM, Raffaello Giulietti wrote:
As far as I can tell, scientific computation will make use of binary
floating point numbers for a long time. Decimal floating point numbers
are still limited to biz and fin applications.
More information about the core-libs-dev
mailing list