+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, [email protected]<mailto:[email protected]> wrote: Date: Tue, 30 Mar 2021 22:12:32 -0400 From: Brian Goetz <[email protected]<mailto:[email protected]>> To: Raffaello Giulietti <[email protected]<mailto:[email protected]>>, Paul Sandoz <[email protected]<mailto:[email protected]>> Cc: core-libs-dev <[email protected]<mailto:[email protected]>> Subject: Re: Proposal for Decimal64 and Decimal128 value-based classes Message-ID: <[email protected]<mailto:[email protected]>> 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.
