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

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

                Author: ASF GitHub Bot
            Created on: 06/Mar/22 14:29
            Start Date: 06/Mar/22 14:29
    Worklog Time Spent: 10m 
      Work Description: martin-g opened a new pull request #1580:
URL: https://github.com/apache/avro/pull/1580


   Do not resolve Schema::Ref when printing as JSON.
   The Java SDK complains that a type is redefined if it is not a Ref the
   second time
   
   ### 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-3433
     - 
   ### Tests
   
   - [X] My PR adds and updates some unit tests
   
   ### 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
   
   - [X] No need of new documentation
   


-- 
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: 737243)
    Remaining Estimate: 0h
            Time Spent: 10m

> Rust: The canonical form should preserve schema references
> ----------------------------------------------------------
>
>                 Key: AVRO-3433
>                 URL: https://issues.apache.org/jira/browse/AVRO-3433
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: rust
>    Affects Versions: 1.12.0
>            Reporter: Martin Tzvetanov Grigorov
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Reported at 
> [https://github.com/flavray/avro-rs/issues/182#issuecomment-1059762821]
> =================================
> There still seems to be an issue with {{can't refine}} errors, at least in 
> some non-recursive cases. Take the following example:
> {code:java}
> fn main() {
>     let schema = r#"
>     {
>       "name": "test.test",
>       "type": "record",
>       "fields": [
>         {
>           "name": "bar",
>           "type": { "name": "test.foo", "type": "record", "fields": [{ 
> "name": "id", "type": "long" }] }
>         },
>         { "name": "baz", "type": "test.foo" }
>       ]
>     }
>     "#;
>     let schema = apache_avro::schema::Schema::parse_str(&schema).unwrap();
>     println!("{}", serde_json::to_string(&schema).unwrap());
> } {code}
> This prints the following (the same thing happens if the {{test.foo}} 
> definition is in a separate file):
> {code:java}
> $ target/release/avro-test | jq
> {
>   "type": "record",
>   "name": "test.test",
>   "fields": [
>     {
>       "name": "bar",
>       "type": {
>         "type": "record",
>         "name": "test.foo",
>         "fields": [
>           {
>             "name": "id",
>             "type": "long"
>           }
>         ]
>       }
>     },
>     {
>       "name": "baz",
>       "type": {
>         "type": "record",
>         "name": "test.foo",
>         "fields": [
>           {
>             "name": "id",
>             "type": "long"
>           }
>         ]
>       }
>     }
>   ]
> } {code}
> Which will cause the Java tooling to fail with the 
> {{org.apache.avro.SchemaParseException: Can't redefine: test}} error above.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to