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

Avro IDL: Support dot ('.') character in property annotation names

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8.2
    • 1.9.0
    • java
    • None

    Description

      Unless there is a strong reason why names like @foo.bar can't be used as property annotations in IDL, I propose an enhancement to the IDL parser to allow it.

      The major drive for this change comes from Kafka Connect; for a certain fields – namely timestamps – additional metadata must be present in the schema when certain consumers read the data (e.g. the JDBC connector). What I hoped when using IDL was to write the following for a record field:

      union {null, @connect.version(1) @connect.name("org.apache.kafka.connect.data.Timestamp") long} queryTime;

      so that the following would be available in the schemata:

      {
        "name": "queryTime",
        "type": [
          "null",
          {
            "type": "long",
            "connect.version": 1,
            "connect.name": "org.apache.kafka.connect.data.Timestamp"
          }
        ],
        "default": null
      }

      Unfortunately, both connect.version and connect.name are unacceptable by the parser.

      The change for this is quite minimal as it can be based on AVRO-1267.

       

      Attachments

        Activity

          People

            cutting Doug Cutting
            kdrakon Sean Policarpio
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: