[ 
https://issues.apache.org/jira/browse/AVRO-4358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated AVRO-4358:
---------------------------------
    Labels: pull-request-available  (was: )

> [C] Schema resolution maps enum values by index instead of symbol name
> ----------------------------------------------------------------------
>
>                 Key: AVRO-4358
>                 URL: https://issues.apache.org/jira/browse/AVRO-4358
>             Project: Apache Avro
>          Issue Type: Bug
>            Reporter: Fabio Carneiro
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The resolved writer and resolved reader copy the writer's enum index into the 
> reader's value without matching symbols by name 
> (lang/c/src/resolved-writer.c:1739, lang/c/src/resolved-reader.c:1629). This 
> causes the following issues:
> - A writer with enum [RED, GREEN] and reader with enum [GREEN, RED]: the 
> resolved reader would assign the same index to a different symbol.
> - If the writer uses a symbol the reader doesn't have, the reader gets an 
> out-of-range enum value instead of an error.
> The proposed fix maps writer symbols to reader symbols by name when the 
> resolver is created, failing if a reader does not have a certain symbol.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to