Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3160

Decimal logical type for strings

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • None
    • None
    • java
    • None

    Description

      Currently in avro there is just one way to represent BigDecimal: using bytes type with decimal logical type.

      Unfortunately, it's not really convenient to use in non-java environments (we currently have services in java and PHP that are communicating using avro).

      As an alternative, string could be used to represent decimal number without loosing precision and that's how we are doing it now. I propose to add logical type decimal to the type string to be able to use BigDecimal directly without converting it on client side.

      I could create a PR for that but wanted to know your opinion first about it, would you consider merging it? (I guess that's a question to rskraba)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kaliy Artur Kalimullin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: