[ 
https://issues.apache.org/jira/browse/BEAM-13768?focusedWorklogId=717277&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-717277
 ]

ASF GitHub Bot logged work on BEAM-13768:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jan/22 21:04
            Start Date: 28/Jan/22 21:04
    Worklog Time Spent: 10m 
      Work Description: kmjung commented on a change in pull request #16644:
URL: https://github.com/apache/beam/pull/16644#discussion_r794888197



##########
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:
       I don't understand why we would ever want to return null from a call to 
`getTargetTableId`. Either the table should exist and be readable or we should 
have raised an exception prior to this point.




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 717277)
    Time Spent: 40m  (was: 0.5h)

> NullPointerException in BigQueryStorageSourceBase
> -------------------------------------------------
>
>                 Key: BEAM-13768
>                 URL: https://issues.apache.org/jira/browse/BEAM-13768
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>            Reporter: Kenneth Knowles
>            Assignee: Kenneth Knowles
>            Priority: P2
>              Labels: nullability
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This value is nullable: 
> https://github.com/apache/beam/commit/86db595d3c19a80d7eaa9bfbd20739afae20c7c6#diff-a8ca6a251feb58aa7fe77c74d02b25f5b0c33716eae81ef65861f2fa4a6e956bR116
> But it is passed to a function that does not accept null.
> This was discovered by a user hitting it.
> This is caused by disabling the null check for this class.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to