[
https://issues.apache.org/jira/browse/BEAM-14529?focusedWorklogId=777583&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-777583
]
ASF GitHub Bot logged work on BEAM-14529:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Jun/22 14:08
Start Date: 02/Jun/22 14:08
Worklog Time Spent: 10m
Work Description: 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)
Issue Time Tracking
-------------------
Worklog Id: (was: 777583)
Time Spent: 1.5h (was: 1h 20m)
> Beam BQIO not accepting integer values for BQ table fields of type Float64
> --------------------------------------------------------------------------
>
> Key: BEAM-14529
> URL: https://issues.apache.org/jira/browse/BEAM-14529
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp
> Reporter: Yiru Tang
> Assignee: Yiru Tang
> Priority: P2
> Fix For: 2.40.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> Customer (F5) is working on migrating to the new Storage API support in Beam
> SDK and are facing issues in the latest Snapshot build. Today, in production,
> they are using the legacy streaming API and their pipeline works fine when
> they are mapping an incoming integer field to a BQ table field of type
> Float64. However, with the storage API, their pipeline is failing with the
> following error "Unexpected value :0, type: class java.lang.Integer. Table
> field name: a, type: FLOAT64" Customer considers this as a regression and is
> preventing them from going live with Storage API. Customer is planning on
> going live with Storage API end of July and would like to have this fixed in
> the 2.39.0 GA release.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)