[
https://issues.apache.org/jira/browse/AVRO-3312?focusedWorklogId=711353&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-711353
]
ASF GitHub Bot logged work on AVRO-3312:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Jan/22 12:15
Start Date: 19/Jan/22 12:15
Worklog Time Spent: 10m
Work Description: martin-g opened a new pull request #1465:
URL: https://github.com/apache/avro/pull/1465
### Jira
- [X] My PR addresses the following [Avro
Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them
in the PR title. For example, "AVRO-1234: My Avro PR"
- https://issues.apache.org/jira/browse/AVRO-3312
### Tests
- [X] No new functionality! All previous tests still pass!
### Commits
- [X] My commits all reference Jira issues in their subject lines.
### Documentation
- [X] No need of new documentation! This is an API change and the library
users will have to fix the compilation error.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 711353)
Remaining Estimate: 0h
Time Spent: 10m
> Rust: Use u32 instead of i32 for the Enum/Union's index field
> -------------------------------------------------------------
>
> Key: AVRO-3312
> URL: https://issues.apache.org/jira/browse/AVRO-3312
> Project: Apache Avro
> Issue Type: Improvement
> Components: rust
> Reporter: Martin Tzvetanov Grigorov
> Assignee: Martin Tzvetanov Grigorov
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently Rust's Value::Enum and Value::Union use i32 (i.e. signed int) for
> their index
> [fields|https://github.com/apache/avro/blob/49c6e1067c937d066503be9c7f4032fb03f67474/lang/rust/src/types.rs#L61-L74]:
> {code}
> /// An `enum` Avro value.
> ///
> /// An Enum is represented by a symbol and its position in the symbols
> list
> /// of its corresponding schema.
> /// This allows schema-less encoding, as well as schema resolution while
> /// reading values.
> Enum(i32, String),
> /// An `union` Avro value.
> ///
> /// A Union is represented by the value it holds and its position in the
> type list
> /// of its corresponding schema
> /// This allows schema-less encoding, as well as schema resolution while
> /// reading values.
> Union(i32, Box<Value>),
> {code}
> Since they cannot be negative it would be better to change them to u32
> (unsigned int).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)