wgtmac opened a new pull request, #4001:
URL: https://github.com/apache/avro/pull/4001
## What is the purpose of the change
Avro C++ currently drops custom attributes attached directly to primitive
schema objects.
The schema compiler does not collect unknown properties from primitive
objects,
and `NodePrimitive::printJson` only emits an object for logical types without
serializing primitive custom attributes.
This is required by integrations such as Apache Iceberg. Iceberg uses the
`adjust-to-utc` property to distinguish `timestamp` from `timestamptz`, while
both types use Avro `long` with the `timestamp-micros` logical type.
This change:
- Preserves unknown properties when parsing primitive schema objects.
- Serializes a primitive as a JSON object when it has a logical type or
custom
attributes.
- Keeps the implementation generic and does not add Iceberg-specific
behavior.
## Verifying this change
This change added tests and can be verified as follows:
- Added a schema round-trip test for Iceberg's `adjust-to-utc` property.
- Added coverage for a generic primitive custom property without a logical
type.
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
--
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]