You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/01/15 21:46:03 UTC

[GitHub] [beam] robinyqiu commented on a change in pull request #13751: [BEAM-11533] Support DATE, TIME, DATETIME in PubSub

robinyqiu commented on a change in pull request #13751:
URL: https://github.com/apache/beam/pull/13751#discussion_r558609190



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/util/RowJson.java
##########
@@ -515,7 +537,11 @@ private void writeValue(JsonGenerator gen, FieldType type, Object value) throws
           writeRow((Row) value, type.getRowSchema(), gen);
           break;
         case LOGICAL_TYPE:
-          writeValue(gen, type.getLogicalType().getBaseType(), value);
+          if (KNOWN_LOGICAL_TYPE_IDENTIFIERS.contains(type.getLogicalType().getIdentifier())) {
+            gen.writeString(value.toString()); // ISO 8601 format

Review comment:
       Done.




----------------------------------------------------------------
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:
users@infra.apache.org