spiegela commented on PR #1921:
URL: https://github.com/apache/avro/pull/1921#issuecomment-1313738237

   To make sure I understand the status of change, is the remaining question 
here how the AvroSchema derive should _”choose”_ which enum format to use when 
constructing the schema?
   
   If so, I was thinking that the AvroSchema derive _could_ infer the correct 
behavior based on the variant characteristics:
   * All unit variants, create an enum schema as we do today.
   * 1+ non-unit variants with either named fields, or single field unnamed 
fields, use the Record-style (as in this PR) as the schema.
   
   That leaves the case of non-unit, multi-field, unnamed fields 😅. For those, 
we should return a compile error, I think, and let the dev implement 
`AvroSchemaComponent` themselves — otherwise, _could_ add Record fields named 
`0`, `1`, …


-- 
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]

Reply via email to