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


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BatchLoads.java:
##########
@@ -285,14 +285,17 @@ public void validate(@Nullable PipelineOptions 
maybeOptions) {
     PipelineOptions options = Preconditions.checkArgumentNotNull(maybeOptions);
     // We will use a BigQuery load job -- validate the temp location.
     String tempLocation;
-    if (customGcsTempLocation == null || customGcsTempLocation.get() == null) {
+    if (customGcsTempLocation == null) {
       tempLocation = options.getTempLocation();
     } else {
       if (!customGcsTempLocation.isAccessible()) {
         // Can't perform verification in this case.
         return;
+      } else if (Strings.isNullOrEmpty(customGcsTempLocation.get())) {

Review Comment:
   tried to add one using RuntimeValueProvider, however using 
pipeline.newProvider(...) in unit test makes the value provider still 
accessible at compile time. Looks like one needs a  pipeline proto (Dataflow 
templates) to test the case



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