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


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java:
##########
@@ -1024,21 +1062,202 @@ public String apply(BigQueryDynamicReadDescriptor 
input) {
               .apply("Checkpoint", Redistribute.byKey());
 
       PCollectionTuple resultTuple =
-          addJobId
-              .apply("Create streams", ParDo.of(new 
CreateBoundedSourceForTable()))
+          addJobId.apply(
+              "Create streams",
+              ParDo.of(new CreateBoundedSourceForTable(cleanupInfoTag))
+                  .withOutputTags(streamTag, TupleTagList.of(cleanupInfoTag)));
+
+      PCollection<KV<String, BigQueryStorageStreamSource<T>>> streams =
+          resultTuple
+              .get(streamTag)
               .setCoder(
-                  SerializableCoder.of(new 
TypeDescriptor<BigQueryStorageStreamSource<T>>() {}))
-              .apply("Redistribute", Redistribute.arbitrarily())
-              .apply(
-                  "Read Streams with storage read api",
-                  ParDo.of(
-                          new TypedRead.ReadTableSource<T>(
-                              rowTag, getParseFn(), getBadRecordRouter()))
-                      .withOutputTags(rowTag, 
TupleTagList.of(BAD_RECORD_TAG)));
+                  KvCoder.of(
+                      StringUtf8Coder.of(),
+                      SerializableCoder.of(
+                          new TypeDescriptor<BigQueryStorageStreamSource<T>>() 
{})))
+              .apply("Redistribute", Redistribute.arbitrarily());
+
+      PCollectionTuple readResultTuple =
+          streams.apply(
+              "Read Streams with storage read api",
+              ParDo.of(
+                      new ReadDynamicStreamSource<T>(

Review Comment:
   Just want to make sure that we considered and ruled out the case of 
premature deletion of temp tables before they are fully processed and 
corresponding workitems are completed.



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