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/11/18 18:46:34 UTC

[GitHub] [beam] apilloud commented on a change in pull request #16015: [BEAM-13286] RowJson should expect ReadableInstant for DATETIME values in Rows

apilloud commented on a change in pull request #16015:
URL: https://github.com/apache/beam/pull/16015#discussion_r752528581



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/util/RowJson.java
##########
@@ -527,7 +527,9 @@ private void writeValue(JsonGenerator gen, FieldType type, Object value) throws
           gen.writeNumber((BigDecimal) value);
           break;
         case DATETIME:
-          gen.writeString(((DateTime) value).toString()); // ISO 8601 format
+          assert (value instanceof ReadableInstant);

Review comment:
       nit: If you cast `value` to `ReadableInstant` you get similar behavior but it isn't sometimes a comment. What is the advantage of this way?




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

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org