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


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java:
##########
@@ -2467,10 +2525,13 @@ abstract static class Builder<T> {
       abstract Builder<T> setTableFunction(
           SerializableFunction<ValueInSingleWindow<T>, TableDestination> 
tableFunction);
 
-      abstract Builder<T> setFormatFunction(SerializableFunction<T, TableRow> 
formatFunction);
+      abstract Builder<T> setFormatFunction(
+          SerializableBiFunction<TableRowToStorageApiProto.SchemaInformation, 
T, TableRow>
+              formatFunction);
 
       abstract Builder<T> setFormatRecordOnFailureFunction(
-          SerializableFunction<T, TableRow> formatFunction);
+          SerializableBiFunction<TableRowToStorageApiProto.SchemaInformation, 
T, TableRow>

Review Comment:
   Done



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/TableRowToStorageApiProto.java:
##########
@@ -221,6 +189,232 @@ private static String 
getPrettyFieldName(SchemaInformation schema) {
           .put(TableFieldSchema.Type.JSON, "JSON")
           .build();
 
+  @FunctionalInterface
+  public interface ThrowingBiFunction<FirstInputT, SecondInputT, OutputT> {
+    OutputT apply(FirstInputT t, SecondInputT u) throws 
SchemaConversionException;
+  }
+
+  static final DecimalFormat DECIMAL_FORMAT = new 
DecimalFormat("0.0###############");

Review Comment:
   Fixed



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