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

ASF GitHub Bot logged work on BEAM-9113:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Jan/20 22:27
            Start Date: 13/Jan/20 22:27
    Worklog Time Spent: 10m 
      Work Description: alexvanboxel commented on pull request #10569: 
[BEAM-9113] Fix serialization proto logical types
URL: https://github.com/apache/beam/pull/10569#discussion_r366062664
 
 

 ##########
 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:
   Well the other solution is making the schema not static. I do think we need 
to fix it for 2.19 otherwise the Proto support with Timestamp doesn't work on 
Dataflow.
 
----------------------------------------------------------------
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: 371160)
    Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  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)

Reply via email to