KalleOlaviNiemitalo commented on PR #3680:
URL: https://github.com/apache/avro/pull/3680#issuecomment-4016652622
My first thought was this would just be a SDK-specific decision on how
language-specific types map to the Avro types, and would be documented in the
SDK documentation only, not in the Avro specification.
However, it seems this change could cause ambiguity when encoding a Ruby
string value "1970-01-01" using an Avro union schema like
```json
[
{ "type": "int", "logicalType": "date" },
{ "type": "string" }
]
```
as the string would previously have matched only the second branch of the
union, but this change would make it match the first branch too.
In which case the Avro specification should perhaps advise schema authors to
avoid defining unions like that. Or the Ruby SDK should provide a way to give
the encoder a string that will not be coerced to a date.
--
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]