-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
AVRO-3709: [Rust] Add aliases to record fields #2087
Conversation
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Use String instead of Alias. Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
@woile Please review this PR and test the branch! Thank you! |
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
fc39fae
to
a33f2db
Compare
Thank you Martin, I'll review tomorrow morning (CET) |
.map(|alias| Alias::new(alias).expect("Alias is not valid")) | ||
.collect::<Vec<Alias>>() | ||
.map(|alias| alias.to_string()) | ||
.collect::<Vec<String>>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you find the information about Aliases not requiring namespaces for RecordField
? I was using the same alias parser
to parse an Enum
for example, but they now have different signature, it's not really a problem, but in the spec the text is the same for Enum
and for RecordField
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Named schema's aliases
are for the schema's name
which might be namespaced.
Record field's aliases are for the field's name
which is not namespaced. The field's type
might be a (namespaced) reference to Schema.
It works on my project 👍🏻 |
* AVRO-3709: [Rust] Add 'aliases' field to RecordField * AVRO-3709: [Rust] Add support for serializing RecordField's aliases * AVRO-3709: [Rust] Record field's aliases don't have namespace Use String instead of Alias. * AVRO-3709: [Rust] Add support for field aliases in avro_derive --------- Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org> (cherry picked from commit a512fa2)
AVRO-3709
What is the purpose of the change
Adds support for Record field aliases
Verifying this change
Old tests are updated.
New tests are added.
Documentation