TheNeuralBit commented on a change in pull request #16015:
URL: https://github.com/apache/beam/pull/16015#discussion_r752535700
##########
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 wasn't sure it was desirable to fail if value is not a ReadableInstant.
Then again, I think your nudge has convinced me that is desirable, since we
generally prefer failing rather than producing an incorrect result.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]