kennknowles commented on a change in pull request #16644:
URL: https://github.com/apache/beam/pull/16644#discussion_r795314445



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryStorageSourceBase.java
##########
@@ -107,17 +104,19 @@
     BigQueryOptions bqOptions = options.as(BigQueryOptions.class);
     Table targetTable = getTargetTable(bqOptions);
 
-    String tableReferenceId = "";
+    ReadSession.Builder readSessionBuilder = ReadSession.newBuilder();
     if (targetTable != null) {
-      tableReferenceId = 
BigQueryHelpers.toTableResourceName(targetTable.getTableReference());
+      readSessionBuilder.setTable(
+          
BigQueryHelpers.toTableResourceName(targetTable.getTableReference()));
     } else {
       // If the table does not exist targetTable will be null.
       // Construct the table id if we can generate it. For error 
recording/logging.
-      tableReferenceId = getTargetTableId(bqOptions);
+      @Nullable String tableReferenceId = getTargetTableId(bqOptions);

Review comment:
       (so I've discovered via users that a query-based BigQueryIO read always 
NPEs on line 119 from before the diff so this is pretty severe)




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