MiguelAnzoWizeline commented on a change in pull request #14586:
URL: https://github.com/apache/beam/pull/14586#discussion_r625264203
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java
##########
@@ -525,6 +525,11 @@ public static TableRow toTableRow(Row row) {
return toTableRow((Row) fieldValue);
case DATETIME:
+ if (fieldValue instanceof Long) {
+ return Instant.ofEpochMilli((long) fieldValue)
+ .toDateTime(DateTimeZone.UTC)
+ .toString(BIGQUERY_TIMESTAMP_PRINTER);
+ }
Review comment:
This validation comes from
[this](https://github.com/apache/beam/pull/10369/commits/79be403dc3f784a241a4129d987dc5a126f34568)
commit in the previous PR, I'm struggling to find why it was added, as I don't
see any change that gives the possibility of the DATETIME being a Long instead
of Instant. Should this be removed?
--
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]