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

Variable named 'date' in IDL

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Information Provided
    • 1.8.1
    • None
    • java
    • None

    Description

      I was compiling Apache Parquet and found that the switch from Avro 1.8.0 to 1.8.1 broke their build.

      The error:

      [ERROR] Failed to execute goal org.apache.avro:avro-maven-plugin:1.8.1:idl-protocol (schemas) ... 
      org.apache.avro.compiler.idl.ParseException: Encountered " "date" "date "" at line 23, column 14.
      [ERROR] Was expecting one of:
      [ERROR] <IDENTIFIER> ...
      [ERROR] "@" ...
      [ERROR] "`" ...
      [ERROR] -> [Help 1]
      

      As it turns out they have a test idl that contains this:

      @namespace("org.apache.parquet.avro")
      protocol Cars {
          record Service {
              long date;
          }
      }
      

      And this change AVRO-1684 turned the word 'date' into something different for the idl compiler.

      So changing the word 'date' into something else fixes the problem.
      Yet I think this is an undesirable effect for end user applications.

      Ryan Blue: I assigned this to you implemented the mentioned change.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rdblue Ryan Blue
            nielsbasjes Niels Basjes
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment