Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Logical Type support for java.util.UUID #536

Conversation

MichalFoksa
Copy link
Contributor

This PR adds logical type uuid into java.util.UUID Avro schema.

Until now UUID schema was:

{
  "type" : "fixed",
  "name" : "UUID",
  "namespace" : "java.util",
  "size" : 16
}

Now, with logicalTypesEnabled = true, schema is:

{
  "type" : "fixed",
  "name" : "UUID",
  "namespace" : "java.util",
  "size" : 16,
  "logicalType" : "uuid"        <----- new property
}

… created in Avro schema.

Doc field is not mandatory and having it empty doe snot help either.
…calTypesEnabled enabled,

 * Avro schema is created with logical type uuid.
@MichalFoksa MichalFoksa changed the title Logical type for java.util.UUID [Avro] Logical type for java.util.UUID Dec 23, 2024
@cowtowncoder cowtowncoder changed the title [Avro] Logical type for java.util.UUID Add Logical Type support for java.util.UUID Dec 24, 2024
@cowtowncoder cowtowncoder merged commit 10fc1ba into FasterXML:2.19 Dec 24, 2024
4 checks passed
@cowtowncoder cowtowncoder added this to the 2.19.0 milestone Dec 24, 2024
@cowtowncoder
Copy link
Member

Thank you @MichalFoksa ! Merged for inclusion in 2.19.0.

@MichalFoksa
Copy link
Contributor Author

@cowtowncoder
You are welcome!

@MichalFoksa
Copy link
Contributor Author

PR with Decimal logical type will come later.

I think we will need a new annotation to express decimal precision and scale. Probably @Decimal(precision = 2, scale = 10).

I will suggest something in PR and we can discuss it.

Merry Christmas 🎅 🎄!

@cowtowncoder
Copy link
Member

Merry Christmas @MichalFoksa !

@MichalFoksa MichalFoksa deleted the feature/2.19/add_logical_type_to_UUID_schema branch December 25, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants