Git Product home page Git Product logo

Comments (3)

cowtowncoder avatar cowtowncoder commented on May 27, 2024 1

If anyone wants to take a stab for both serialization and deserialization, I can merge it.

I can't quite tell from description exactly how logical types should work so some investigation would be needed to figure out the whole system. There seem to be other logical types that could be supported as well.

from jackson-dataformats-binary.

cowtowncoder avatar cowtowncoder commented on May 27, 2024

FWTW, there has been lots of recent activity wrt Avro module, and I think BigDecimal values may now be handled as Strings. I think this isn't 100% what was asked here but thought I'll mention as it may be relevant for further improvements.

from jackson-dataformats-binary.

baharclerode avatar baharclerode commented on May 27, 2024

Correct, in master BigDecimal is now correctly handled in a manner that is consistent with the avro reference implementation and fully preserves all precision.

Because BigDecimal is dynamic precision and the avro logical Decimal type is fixed precision, I would not generate schemas with logical Decimal fields for java's BigDecimal; However, the NonBSGenericDatumWriter could be updated such that Jackson is supported writing a BigDecimal into a logical Decimal field, assuming you have a hand-generated schema or used the @AvroSchema annotation. (It already coerces BigDecimals into a double if the field schema is DOUBLE instead of STRING to preserve compatibility with previously-generated schemas)

from jackson-dataformats-binary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.