pabloem commented on code in PR #25195:
URL: https://github.com/apache/beam/pull/25195#discussion_r1210743421


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryHelpers.java:
##########
@@ -593,10 +593,15 @@ static String getDatasetLocation(
 
   static void verifyTablePresence(DatasetService datasetService, 
TableReference table) {
     try {
-      datasetService.getTable(table);
+      Table fetchedTable = datasetService.getTable(table);
+      if (fetchedTable == null) {
+        throw new IOException("Table does not exist.");

Review Comment:
   ah note that this exception is caught again on line 603 and formatted 
properly. Why do we do this? because `datasetService.getTable` can also throw 
an exception so we deal with both cases there



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