You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/22 15:05:00 UTC

[jira] [Work logged] (AVRO-3585) Unable to encode Value::String as Schema::UUID

     [ https://issues.apache.org/jira/browse/AVRO-3585?focusedWorklogId=794259&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-794259 ]

ASF GitHub Bot logged work on AVRO-3585:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Jul/22 15:04
            Start Date: 22/Jul/22 15:04
    Worklog Time Spent: 10m 
      Work Description: RikHeijdens opened a new pull request, #1778:
URL: https://github.com/apache/avro/pull/1778

   Make sure you have checked _all_ steps below.
   
   ### 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-XXX
     - In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   
   ### Tests
   
   - [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   ### Commits
   
   - [x] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](https://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes how to use it.
     - All the public functions and the classes in the PR contain Javadoc that explain what it does
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 794259)
    Remaining Estimate: 0h
            Time Spent: 10m

> Unable to encode Value::String as Schema::UUID
> ----------------------------------------------
>
>                 Key: AVRO-3585
>                 URL: https://issues.apache.org/jira/browse/AVRO-3585
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: rust
>            Reporter: Rik Heijdens
>            Priority: Blocker
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently, `apache_avro::encode::encode()` fails to encode a Value::String as UUID. This failure can be reproduced using the following minimal test-case:
>  
> {code:java}
>     #[test]
>     fn test_encode_uuid() {
>         let value = Value::String(String::from("00000000-0000-0000-0000-000000000000"));
>         let schema = Schema::Uuid;
>         let mut buffer = Vec::new();
>         let encoded = encode(&value, &schema, &mut buffer);
>         assert!(encoded.is_ok());
>     } {code}
>  
>  
> I believe it should be possible to encode UUIDs in this manner, and support can be trivially added by extending the match statement in `apache_avro::encode::encode_internal`.



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