-
Notifications
You must be signed in to change notification settings - Fork 29
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
support of metadata #32
Comments
Could you provide a more specific example of such a feature ? With an example schema and the expected generated struct. |
Here is an example:
messagetType, senderRole, protocoleRoles, multipartFlag are metadata I think. I do not exactly know how to represent them in Rust. Maybe something like:
And I think it could reopen #23 because I am not sure this case is handled by the schema generation. |
Sadly those are non standard fields, there is no way to know their (potentially nested) type. |
I understand your point. These attributes are not part of the avro spec. However their presence in the schema is allowed by the spec. I have a data exchange protocol using avro schemas that uses this possibility to add constants (no need of fields) at the protocol level. |
As mentioned by @lerouxrgd custom attributes are not supported yet by apache-avro. We've just had a big head ache due to the new impl for those in the C++ SDK:
At the end we agreed to make the custom attributes' values string-only. The user application could parse the value if needed. |
@martin-g I looked very quickly at those issues. It is mentioned for « at field level ». Is this a still a general implementation for custom attributes at any level ? I will open a ticket and try an implementation next week. |
According to the spec attributes/metadata could be next to But top-level looks very much like file metadata. |
First a question: the spec calls these: "metadata", so why calling them "custom attributes" instead of metadata in the implementation ? I do not know what "Object Container Files" are and used for.
For me the metadata are in the schema only because of this from spec:
|
Better ask these questions in the dev@ mailing list.
Not sure, but for me the answer is - consistency with the other SDKs. I have started working on this and I will create a draft PR soon! |
Hi,
I have avro schemas where metadata have been introduced for records.
As written in the doc:
But has someone a idea how I could generate these metadata as part of an avro trait without serializing them ?
Maybe:
#[serde(skip)]
to skip both serialization and deserialization ?Whould you accept a PR with such a feature ?
The text was updated successfully, but these errors were encountered: