reuvenlax commented on code in PR #17779:
URL: https://github.com/apache/beam/pull/17779#discussion_r887995830


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/TableRowToStorageApiProto.java:
##########
@@ -348,6 +348,8 @@ static Object singularFieldToProtoValue(
           return Double.valueOf((String) value);
         } else if (value instanceof Double || value instanceof Float) {
           return ((Number) value).doubleValue();
+        } else if (value instanceof Integer || value instanceof Long) {
+          return ((Number) value).longValue();

Review Comment:
   Shouldn't this still be .doubleValue() since the proto schema for FLOAT will 
be a double? If so, then maybe we can simply replace
   
   else if (value instanceof Double || value instanceof Float)
   
   with
   
   else if (value instanceof Number)



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

Reply via email to