+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-requ...@openjdk.java.net<mailto:core-libs-dev-requ...@openjdk.java.net> wrote: Date: Tue, 30 Mar 2021 22:12:32 -0400 From: Brian Goetz <brian.go...@oracle.com<mailto:brian.go...@oracle.com>> To: Raffaello Giulietti <raffaello.giulie...@gmail.com<mailto:raffaello.giulie...@gmail.com>>, Paul Sandoz <paul.san...@oracle.com<mailto:paul.san...@oracle.com>> Cc: core-libs-dev <core-libs-dev@openjdk.java.net<mailto:core-libs-dev@openjdk.java.net>> Subject: Re: Proposal for Decimal64 and Decimal128 value-based classes Message-ID: <64334a24-0e4c-57b8-b666-447ca3508...@oracle.com<mailto:64334a24-0e4c-57b8-b666-447ca3508...@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.