Abacn commented on code in PR #28272:
URL: https://github.com/apache/beam/pull/28272#discussion_r1319029557


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteTables.java:
##########
@@ -156,27 +149,36 @@ private class WriteTablesDoFn
     private class PendingJobData {
       final BoundedWindow window;
       final BigQueryHelpers.PendingJob retryJob;
-      final List<String> partitionFiles;
+      final WritePartition.Result partitionResult;
       final TableDestination tableDestination;
       final TableReference tableReference;
       final DestinationT destinationT;
-      final boolean isFirstPane;
 
       public PendingJobData(
           BoundedWindow window,
           BigQueryHelpers.PendingJob retryJob,
-          List<String> partitionFiles,
+          WritePartition.Result partitionResult,
           TableDestination tableDestination,
           TableReference tableReference,
-          DestinationT destinationT,
-          boolean isFirstPane) {
+          DestinationT destinationT) {
         this.window = window;
         this.retryJob = retryJob;
-        this.partitionFiles = partitionFiles;
+        this.partitionResult = partitionResult;
         this.tableDestination = tableDestination;
         this.tableReference = tableReference;
         this.destinationT = destinationT;
-        this.isFirstPane = isFirstPane;
+      }
+
+      public List<String> paritionFiles() {
+        return partitionResult.getFilenames();
+      }
+
+      public boolean isFirstPane() {
+        return partitionResult.isFirstPane();
+      }
+
+      public long paneIndex() {

Review Comment:
   I am going to preserve the change to PendingJobData, as the pane index info 
would be helpful to resolve possible racing condition of CREATE_TRUNCATE 
pending jobs



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