Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-1607

Decimal handling bug in SparkAvroPostProcessor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      This issue related to [#[Hudi-1343]|https://github.com/apache/hudi/pull/2192.]

      I think the purpose of Hudi-1343 was to bridge the difference between avro 1.8.2(used by hudi) and avro 1.9.2(used by upstream system) thru internal Struct type. In particular, the incompatible form to express nullable type between those two versions. 

      It was all good until I hit the type Decimal. Since it can either be FIXED or BYTES, if an avro schema contains decimal type with BYTES as its literal type, after this two way conversion its literal type become FIXED instead. This will cause an exception to be thrown in AvroConversionHelper as the data underneath is HeapByteBuffer rather than GenericFixed.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              RZ Jingwei Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: