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

AvroGen created invalid .cs file for nullable decimal type field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.9.2
    • None
    • csharp
    • None

    Description

      I was using the apache avro 1.9.2 dotnet tool to generate the cs files. There is a nullable logical type 'decimal' in my schema file. The cs file generated has an error as follows.

       

      My schema file is like this:
      {
      "name": "Previous",
      "type":
      [

      { "type": "bytes", "logicalType": "decimal", "precision": 19, "scale": 4 }

      ,
      "null"
      ]
      }
      The cs file created has an error:
      case 1: this.Previous = (System.Nullable`1[Avro.AvroDecimal])fieldValue; break;

      Attachments

        Activity

          People

            Unassigned Unassigned
            alex_xgl Alex Xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: