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

No UUID support in IDL compiler.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.10.0
    • 1.11.0
    • java
    • None

    Description

      There is no UUID support in IDL.

       

      Trying to compile 

       

       

      @namespace("org.apache.avro")
      protocol MyProtocol {
       record APlaygroundEvent {
      /**
       * Documentation must be provided for each attribute
       */
       decimal(9,2) identifier;
      
       /**
       * a nullable uuid field 
       */
      union { null, uuid } optionalString;
       }
      }
      

       

       

      Throws errors

       

      Exception in thread "main" org.apache.avro.AvroTypeException: Unable to resolve org.apache.avro.uuid
       at org.apache.avro.compiler.idl.ResolvingVisitor.visitNonTerminal(ResolvingVisitor.java:112)
       at org.apache.avro.compiler.schema.Schemas.visitNonTerminal(Schemas.java:186)
       at org.apache.avro.compiler.schema.Schemas.visit(Schemas.java:146)
       at org.apache.avro.compiler.idl.SchemaResolver.resolve(SchemaResolver.java:99)
       at org.apache.avro.compiler.idl.Idl.CompilationUnit(Idl.java:135)
       at org.apache.avro.tool.IdlTool.run(IdlTool.java:61)
       at org.apache.avro.tool.Main.run(Main.java:67)
       at org.apache.avro.tool.Main.main(Main.java:56)

       

       

      Attachments

        Issue Links

          Activity

            People

              Anees Anees Mohammed
              Anees Anees Mohammed
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: