[jira] [Commented] (AVRO-2498) UUID generation is not working avro 1.9 version

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (AVRO-2498) UUID generation is not working avro 1.9 version

Dave Cole (Jira)

    [ https://issues.apache.org/jira/browse/AVRO-2498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17354789#comment-17354789 ]

Feroze Daud commented on AVRO-2498:
-----------------------------------

This still doesnt work, even with avro tools 1aa.10.1

 

If I use this schema:
{noformat}
    {
    "name": "guid",
    "type": { "type": "string", "logicalType": "uuid" }
    } {noformat}
 

I get this.

 
{noformat}
   private java.lang.CharSequence guid;
{noformat}
 

There is no warning from the compiler.

We should either fix this, or remove *uuid* from the logical type list. Otherwise what is the point of having this?

 

> UUID generation is not working avro 1.9 version
> -----------------------------------------------
>
>                 Key: AVRO-2498
>                 URL: https://issues.apache.org/jira/browse/AVRO-2498
>             Project: Apache Avro
>          Issue Type: Bug
>            Reporter: Raj G
>            Priority: Major
>
> Hi, 
>  
> I've downloaded avro-tools 1.9 jar and trying to generate a java file from an avro schema using below command
>  
> java -jar avro-tools-1.9.0.jar compile schema ./myschema.avsc  ./avro_java
>  
> and have below schema in my .avsc file to generate a UUID field
> {
>  "name": "myField",
>  "type": {
>  "type": "long",
>  "logicalType": "uuid"
>  }
> }
>  
> But this is generating a long field instead of UUID type. Please suggest.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)