[
https://issues.apache.org/jira/browse/BEAM-9113?focusedWorklogId=371837&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-371837
]
ASF GitHub Bot logged work on BEAM-9113:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jan/20 19:37
Start Date: 14/Jan/20 19:37
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on pull request #10569:
[BEAM-9113] Fix serialization proto logical types
URL: https://github.com/apache/beam/pull/10569#discussion_r366533969
##########
File path:
sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoSchemaLogicalTypes.java
##########
@@ -31,8 +32,13 @@
public abstract static class NanosType<T> implements LogicalType<T, Row> {
private final String identifier;
- private static final Schema SCHEMA =
-
Schema.builder().addInt64Field("seconds").addInt32Field("nanos").build();
+ private static final Schema SCHEMA;
+
+ static {
+ Schema schema =
Schema.builder().addInt64Field("seconds").addInt32Field("nanos").build();
+ schema.setUUID(UUID.fromString("dc5915f1-6db8-3134-9444-4980fb088e92"));
Review comment:
I think I like the (short-term) solution of just making it not static
better. What do you think @reuvenlax?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 371837)
Time Spent: 50m (was: 40m)
> Protobuf NanosType<T> serialisation issues
> ------------------------------------------
>
> Key: BEAM-9113
> URL: https://issues.apache.org/jira/browse/BEAM-9113
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Alex Van Boxel
> Assignee: Alex Van Boxel
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> TheĀ NanosType<T> has 2 known issues:
> * Schema serialisation expects the getArgument to not return a null value
> * UUID of the base type will not be (de)serialised as it is static
--
This message was sent by Atlassian Jira
(v8.3.4#803005)