[
https://issues.apache.org/jira/browse/AVRO-3217?focusedWorklogId=685530&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-685530
]
ASF GitHub Bot logged work on AVRO-3217:
----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Nov/21 22:25
Start Date: 23/Nov/21 22:25
Worklog Time Spent: 10m
Work Description: opwvhk opened a new pull request #1414:
URL: https://github.com/apache/avro/pull/1414
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
- [X] My PR addresses the following [Avro
Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them
in the PR title. For example, "AVRO-1234: My Avro PR"
- https://issues.apache.org/jira/browse/AVRO-3217
- ~In case you are adding a dependency, check if the license complies with
the [ASF 3rd Party License
Policy](https://www.apache.org/legal/resolved.html#category-x).~
### Tests
- [X] 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
- [X] 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](https://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [X] 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 685530)
Remaining Estimate: 0h
Time Spent: 10m
> Avro IDL does not allow creation of avro.java.string subtype
> ------------------------------------------------------------
>
> Key: AVRO-3217
> URL: https://issues.apache.org/jira/browse/AVRO-3217
> Project: Apache Avro
> Issue Type: Bug
> Components: java, tools
> Affects Versions: 1.10.2
> Environment: Java 8, Windows, macOS, Confluent Platform 5.5.1
> Reporter: Timothy Dimo
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
>
> When using a Java application that has class files generated from an avsc
> file via the Avro Maven plugin along with the
> {noformat}
> <stringType>String</stringType>{noformat}
> switch set, serialization of records of the type string such as
>
> {code:java}
> {"name":"eventType","type":"string"}{code}
> will fail. Changing the type to include an "avro.java.string" detail such as
>
> {code:java}
> "name": "eventType",
> "type": {
> "avro.java.string": "String",
> "type": "string"
> }
> {code}
> will succeed.
>
> It is not possible to create this "avro.java.string": "String" detail via the
> Avro IDL language. The schema creator must first create the avsc file then
> manually update all of the "type":"string" fields.
> See also [this
> link|https://stackoverflow.com/questions/69303642/why-does-an-avro-field-that-was-string-now-require-avro-java-string-type].
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)