-
Notifications
You must be signed in to change notification settings - Fork 1.7k
AVRO-1329: Extended enums #1067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Dunno what these CI issues are, can anyone help there? |
|
@Humbedooh - Hi, Daniel. Can you please elaborate as to why this ticket is being closed? |
|
@unchuckable, I guess it's because this pull request targeted the "master" branch, which has now been renamed to "main" (AVRO-3878, #2537). Are you able to retarget this to "main"? I would like to have "symbol-props" or similar at least added to the Avro specification, even if the per-language libraries were not changed to recognize it. I have a custom application that generates HTML documentation from Avro schemas, and I'd be able to implement "symbol-props" there and then migrate the per-symbol documentation from the "doc" properties of my enum schemas. |
|
@KalleOlaviNiemitalo, @martin-g Thanks for the explanation. Makes sense. Nice to see not only us have a use case for this. Basically, what I would like to add at a later point, would be enum symbol aliases similar to field aliases, that would help us a lot in schema evolution. |
|
Hovering over the |
|
Interesting. Something must have been screwed up there. Will recreate the change to the best of my ability ;) |
|
Found the original code again, will rebase onto current main and resubmit the pull request these days. |
|
I tried implementing {
"type": "enum",
"symbols": ["zero", "one", "two"],
"symbol-props": {
"zero": {},
"one": { "doc": "uno" }
}
}than with the array style {
"type": "enum",
"symbols": ["zero", "one", "two"],
"symbol-props": [
{ "name": "zero" },
{ "name": "one", "doc": "uno" }
]
}because my application can loop over the value of But perhaps consistency with record schemas is more important than convenience here. |
If you had not found the original code, you could still have fetched it from GitHub, e.g. by running |
|
Please rename "symbol-props" to "symbolProps", for consistency with the "logicalType" attribute. In the current Avro specification, the kebab-case style is used only for names of logical types, e.g. "time-millis". |
Sorry this took a little. Corona and RL made me have to deal with other issues before this one.
Feedback welcome. I tried to provide the functionality of AVRO-1329 along with some suitable yet compatible changes to the public API, but am well willing to make changes as deemed appropriate.
Thanks, and stay safe.
---8<------
Make sure you have checked all steps below.
Jira
Tests
Commits
Documentation