[
https://issues.apache.org/jira/browse/AVRO-3483?focusedWorklogId=755060&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-755060
]
ASF GitHub Bot logged work on AVRO-3483:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Apr/22 23:52
Start Date: 10/Apr/22 23:52
Worklog Time Spent: 10m
Work Description: martin-g commented on code in PR #1636:
URL: https://github.com/apache/avro/pull/1636#discussion_r846868613
##########
lang/rust/avro/src/schema.rs:
##########
@@ -503,12 +503,12 @@ pub struct UnionSchema {
// 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.
- variant_index: HashMap<SchemaKind, usize>,
+ variant_index: BTreeMap<SchemaKind, usize>,
Review Comment:
I've changed the type of the map because otherwise it would be harder to
assert the logged error message when UnionSchema validation fails. HashMap's
Display impl prints the entries in random order every time.
Issue Time Tracking
-------------------
Worklog Id: (was: 755060)
Time Spent: 1.5h (was: 1h 20m)
> [Rust] Log error messages with a reason when the validation fails
> -----------------------------------------------------------------
>
> Key: AVRO-3483
> URL: https://issues.apache.org/jira/browse/AVRO-3483
> Project: Apache Avro
> Issue Type: Improvement
> Components: rust
> Reporter: Martin Tzvetanov Grigorov
> Assignee: Martin Tzvetanov Grigorov
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> Currently types::Value::validate(Schema) just returns a boolean with the
> result of the validation.
> It would be good if the Rust SDK logs the reason for a failed validation.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)