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

AVDL files containing fields called "uuid" no longer compile.

    XMLWordPrintableJSON

Details

    Description

      AVDL files containing fields called "uuid" no longer compile on version 1.11.0 (they did compile on 1.10.2). Using backticks for the field name also results in an error.

      protocol Test {
        record Test {
          string uuid;
        }
      } 

      Results in an error : org.apache.avro.compiler.idl.ParseException: Encountered " "uuid" "uuid "" at line 3, column 12.

      Was expecting one of:
      <IDENTIFIER> ...
       "@" ...
       "`" ...

      If you escape the field name using backticks:

      protocol Test {
        record Test {
          string `uuid`;
        }
      } 

      an error is also raised (because uuid does not seem to be a reserved name):

      org.apache.avro.compiler.idl.ParseException: Encountered " "uuid" "uuid "" at line 3, column 13.
      Was expecting one of:
      "array" ...
      "boolean" ...
      "double" ...
      "enum" ...
      "error" ...
      "false" ...
      "fixed" ...
      "float" ...
      "int" ...
      "long" ...
      "map" ...
      "bytes" ...
      "schema" ...
      "string" ...
      "protocol" ...
      "record" ...
      "throws" ...
      "true" ...
      "union" ...
      "void" ...
      "date" ...
      "time_ms" ...
      "timestamp_ms" ...
      "decimal" ...
      "local_timestamp_ms" ...
      <IDENTIFIER> ...

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              abollaert Alexander Bollaert
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m