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

2021-12-04 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on AVRO-2498:
---

Commit 99547e0ee2e0a4a839253848d7b34bac7f5e4cea in avro's branch 
refs/heads/dependabot/maven/lang/java/org.apache.ant-ant-1.10.12 from feroze 
daud
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=99547e0 ]

AVRO-2498: Add SpecificCompiler support for `uuid` logicalType (#1362)

Co-authored-by: feroze daud 

> 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
>Assignee: Feroze Daud
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.11.1, 1.12.0
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> 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.20.1#820001)


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

2021-11-16 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on AVRO-2498:
---

Commit 4349497ecc68f66b74e35fea01f07153bf0c9146 in avro's branch 
refs/heads/branch-1.11 from feroze daud
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=4349497 ]

AVRO-2498: Add SpecificCompiler support for `uuid` logicalType (#1362)

Co-authored-by: feroze daud 

> 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
>  Labels: pull-request-available
> Fix For: 1.11.1, 1.12.0
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> 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.20.1#820001)


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

2021-11-16 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on AVRO-2498:
---

Commit 99547e0ee2e0a4a839253848d7b34bac7f5e4cea in avro's branch 
refs/heads/master from feroze daud
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=99547e0 ]

AVRO-2498: Add SpecificCompiler support for `uuid` logicalType (#1362)

Co-authored-by: feroze daud 

> 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
>  Labels: pull-request-available
> Fix For: 1.11.1, 1.12.0
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> 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.20.1#820001)


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

2021-11-16 Thread Ryan Skraba (Jira)


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

Ryan Skraba commented on AVRO-2498:
---

Thanks for the contribution!

I've cherry-picked this to 
[branch-1.11|https://github.com/apache/avro/commit/4349497ecc68f66b74e35fea01f07153bf0c9146]
 so you should see this fix in the next release.

> 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
>  Labels: pull-request-available
> Fix For: 1.11.1, 1.12.0
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> 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.20.1#820001)


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

2021-10-07 Thread Feroze Daud (Jira)


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

Feroze Daud commented on AVRO-2498:
---

I created a PR for this.

https://github.com/apache/avro/pull/1359

> 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
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)


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

2021-05-31 Thread Feroze Daud (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)


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

2020-09-09 Thread JBodkin (Jira)


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

JBodkin commented on AVRO-2498:
---

I think this might be due to the SpecificCompiler not adding these conversions, 
there are two places this seems to happen and is missing from both.

 

[https://github.com/apache/avro/blob/caa3a4265bf0a8e6496b63938bc4ab0b6620683c/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java#L366]

 

[https://github.com/apache/avro/blob/caa3a4265bf0a8e6496b63938bc4ab0b6620683c/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java#L101]

I've also noted that local-timestamp-millis, local-timestamp-micros and 
duration are missing from this list.

> 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)


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

2020-09-09 Thread JBodkin (Jira)


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

JBodkin commented on AVRO-2498:
---

This issue still seems to be present in avro-tools-1.10, is there something 
that needs configuring in order for this to take affect?

> 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)


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

2019-10-09 Thread Ryan Skraba (Jira)


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

Ryan Skraba commented on AVRO-2498:
---

Great news for the maven plugin, thank you!  The missing piece for me was 
{{}} avro-maven-plugin configuration which does not exist 
for the avro-tools jar.  

I'm guessing that *far* more devs are generating specific records via the maven 
plugin than the tools jar, so that's very good news.  Is there any work to be 
done on this JIRA then?

> 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)


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

2019-10-08 Thread Ivan Greene (Jira)


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

Ivan Greene commented on AVRO-2498:
---

[~ryanskraba] The problem with UUID logical type is setting a stringType in the 
generator configuration causes the logical type to be ignored. See AVRO-2548 
for info. So the specific compiler will generate java.util.UUID with this issue 
resolved. I have a PR out for that one waiting on review

> 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)


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

2019-10-08 Thread Ryan Skraba (Jira)


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

Ryan Skraba commented on AVRO-2498:
---

[~raj2019] For the moment, it looks like specific records generated with 
avro-tools have never treated UUIDs as anything other than strings.

I think there are two potential bugs or issues here:

1) There's no warning or error when the logical type annotation is ignored 
(when generating a specific record).

I don't think this is a bug or bad behaviour: the spec says to fall back on the 
underlying type if it's otherwise inconsistent.  A warning during schema 
compilation might be a good idea.
 
N.B. There was a simple typo in [~igreene]'s code, but his comment was correct 
– the type should be {{string}}, not {{long}} or {{text}}

{code:java}
{"type": "record",  "name": "Avro2498",  
"fields": [
{"name": "myField", "type": {"type": "string", "logicalType": "uuid"}}
]
}
{code}

2) Unlike decimal or date/time logical types, the specific compiler *never* 
generates fields of type {{java.util.UUID}}.

This might be an interesting new feature to be more consistent with the decimal 
and date/time types built into the SpecificCompiler, especially now that UUID 
has made its appearance in the spec in Avro 1.9.

Is there any strong push to implement a UUID type in generated records?  Should 
we repurpose this JIRA to provide some extra dev feedback when a logical type 
annotation is ignored by the specific compiler or maven plugin?


> 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)


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

2019-10-01 Thread Maxim Bolotin (Jira)


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

Maxim Bolotin commented on AVRO-2498:
-

"type": "text" - doesn't work as well:
Execution default of goal org.apache.avro:avro-maven-plugin:1.9.1:schema 
failed: Type not supported: text -> [Help 1]

> 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)


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

2019-09-19 Thread Ivan Greene (Jira)


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

Ivan Greene commented on AVRO-2498:
---

The 'uuid' logical type applies to fields of avro type 'string' and not 'long'. 
Change your field to
{{
{
"name": "myField",
"type":
{ "type": "text", "logicalType": "uuid" }
}
}}

> 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)