[ https://issues.apache.org/jira/browse/AVRO-3248?focusedWorklogId=706077&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-706077 ]
ASF GitHub Bot logged work on AVRO-3248: ---------------------------------------- Author: ASF GitHub Bot Created on: 10/Jan/22 13:02 Start Date: 10/Jan/22 13:02 Worklog Time Spent: 10m Work Description: martin-g commented on a change in pull request #1396: URL: https://github.com/apache/avro/pull/1396#discussion_r781171826 ########## File path: lang/rust/src/types.rs ########## @@ -66,7 +66,12 @@ pub enum Value { /// reading values. Enum(i32, String), /// An `union` Avro value. - Union(Box<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>), Review comment: Why `i32` ? Could we have negative values ? -- 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: issues-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 706077) Time Spent: 50m (was: 40m) > Rust: Support named types in UnionSchema > ---------------------------------------- > > Key: AVRO-3248 > URL: https://issues.apache.org/jira/browse/AVRO-3248 > Project: Apache Avro > Issue Type: Improvement > Reporter: Lu Litao > Assignee: Martin Tzvetanov Grigorov > Priority: Major > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > currently there's no support for named type in avro's Union type in rust. > as stated in this comment of the UnionSchma struct > {quote}// Used to ensure uniqueness of schema inputs, and provide constant > time finding of the > // schema index given a value. > // **NOTE** that this approach does not work for named types, and will have > to be modified > // to support that. A simple solution is to also keep a mapping of the names > used. > {quote} -- This message was sent by Atlassian Jira (v8.20.1#820001)