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:16:19 UTC

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

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



##########
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:
       I recognize this is effectively a comment, with the added benefit that we'll get a nicer error in tests.




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