Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20175

Avro Confluent Registry SQL format does not support adding nullable columns

    XMLWordPrintableJSON

    Details

      Description

      The AvroSchemaConverter#convertToSchema generates a union with "null" for nullable logical types, but it does not set the default value to null. In turn it makes it impossible to generate a backwards compatible schema from a DDL statement.

      Example:
      1. Create a table: CREATE TABLE t (id INT NOT NULL) WITH (/* avro confluent format*/)
      2. Create a new table over the same topic or alter the old table with CREATE TABLE newT(id INT NOT NULL, optionalDescription STRING) WITH (/* avro confluent format */)
      3. When reading from newT records inserted into t it will fail, because the optionalDescription has no default value.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dwysakowicz Dawid Wysakowicz
                Reporter:
                dwysakowicz Dawid Wysakowicz
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: