chamikaramj commented on code in PR #31106:
URL: https://github.com/apache/beam/pull/31106#discussion_r1604360288


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiLoads.java:
##########
@@ -52,16 +52,18 @@
 /** This {@link PTransform} manages loads into BigQuery using the Storage API. 
*/
 public class StorageApiLoads<DestinationT, ElementT>
     extends PTransform<PCollection<KV<DestinationT, ElementT>>, WriteResult> {
-  final TupleTag<KV<DestinationT, StorageApiWritePayload>> 
successfulConvertedRowsTag =
-      new TupleTag<>("successfulRows");
+  final TupleTag<KV<DestinationT, KV<ElementT, StorageApiWritePayload>>>

Review Comment:
   Yeah, this looks pretty bad.
   
   I wonder if instead of duplicating code here we can introduce an option to 
BQ (say 'withLegacyOutputFormat' or something more descriptive) that results in 
elements being pushed to a new tag with the old format (say 
'successfulWrittenRowsTagWithoutElement') with the old coder.
   
   That way, anyone who needs update compatibility can use that option and we 
do not need to fork code.



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