File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 4040import com .google .cloud .Tuple ;
4141import com .google .cloud .bigquery .BigQueryRetryHelper .BigQueryRetryHelperException ;
4242import com .google .cloud .bigquery .InsertAllRequest .RowToInsert ;
43+ import com .google .cloud .bigquery .QueryJobConfiguration .JobCreationMode ;
4344import com .google .cloud .bigquery .spi .v2 .BigQueryRpc ;
4445import com .google .cloud .bigquery .spi .v2 .HttpBigQueryRpc ;
4546import com .google .common .annotations .VisibleForTesting ;
@@ -2045,6 +2046,14 @@ public Object queryWithTimeout(
20452046 throws InterruptedException , JobException {
20462047 Job .checkNotDryRun (configuration , "query" );
20472048
2049+ // If JobCreationMode is not explicitly set, update it with default value;
2050+ if (configuration .getJobCreationMode () == null ){
2051+ configuration =
2052+ configuration .toBuilder ()
2053+ .setJobCreationMode (getOptions ().getDefaultJobCreationMode ())
2054+ .build ();
2055+ }
2056+
20482057 Span querySpan = null ;
20492058 if (getOptions ().isOpenTelemetryTracingEnabled ()
20502059 && getOptions ().getOpenTelemetryTracer () != null ) {
You can’t perform that action at this time.
0 commit comments