Skip to content

AVRO-3217: Allow any identifier as annotation name#1414

Merged
RyanSkraba merged 1 commit intoapache:masterfrom
opwvhk:AVRO-3217-AllowAnyIdentifierForSchemaProperties
Dec 4, 2021
Merged

AVRO-3217: Allow any identifier as annotation name#1414
RyanSkraba merged 1 commit intoapache:masterfrom
opwvhk:AVRO-3217-AllowAnyIdentifierForSchemaProperties

Conversation

@opwvhk
Copy link
Contributor

@opwvhk opwvhk commented Nov 23, 2021

A field schema can be annotated with the property avro.java.string:

{
  "name": "fieldName",
  "type": {
    "type": "string",
    "avro.java.string": "String"
  }
}

The corresponding IDL is:

@avro.java.`string`("String") string fieldName;

The IDL parser fails on the `. This change fixes that.

Make sure you have checked all steps below.

Jira

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Adjusted the simple.avdl and simple.avpr test

Commits

  • My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain Javadoc that explain what it does

A field schema can be annotated with the property `avro.java.string`:

    {
      "name": "fieldName",
      "type": {
        "type": "string",
        "avro.java.string": "String"
      }
    }

The corresponding IDL is:

    @avro.java.`string`("String") string fieldName;

The IDL parser fails on the `. This change fixes that.
@github-actions github-actions bot added the Java Pull Requests for Java binding label Nov 23, 2021
@RyanSkraba RyanSkraba self-requested a review December 4, 2021 13:21
Copy link
Contributor

@RyanSkraba RyanSkraba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

I've been away from the project for a few weeks -- thanks so much for your patience and for doing these IDL fixes (especially for doing them in these nice, digestible PRs). I should have a bit more time to get some reviews done!

@RyanSkraba RyanSkraba merged commit 64267e1 into apache:master Dec 4, 2021
RyanSkraba pushed a commit that referenced this pull request Dec 4, 2021
A field schema can be annotated with the property `avro.java.string`:

    {
      "name": "fieldName",
      "type": {
        "type": "string",
        "avro.java.string": "String"
      }
    }

The corresponding IDL is:

    @avro.java.`string`("String") string fieldName;

The IDL parser fails on the `. This change fixes that.
@opwvhk opwvhk deleted the AVRO-3217-AllowAnyIdentifierForSchemaProperties branch December 6, 2021 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java Pull Requests for Java binding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants