diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index c8316751e..288e39489 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
- digest: sha256:142286d973c7b6d58186070f203b50058a20a7d7b42147996db24921a18da1b0
+ digest: sha256:9de537d592b60e5eac73b374a28263969bae91ecdb29b445e894576fbf54851c
diff --git a/.github/release-please.yml b/.github/release-please.yml
index c87ad8d73..7abf72a6e 100644
--- a/.github/release-please.yml
+++ b/.github/release-please.yml
@@ -15,6 +15,10 @@ branches:
handleGHRelease: true
releaseType: java-backport
branch: 2.10.x
+ - bumpMinorPreMajor: true
+ handleGHRelease: true
+ releaseType: java-backport
+ branch: 2.19.x
bumpMinorPreMajor: true
handleGHRelease: true
releaseType: java-yoshi
diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml
index 7e57974a8..e3a8af4e9 100644
--- a/.github/sync-repo-settings.yaml
+++ b/.github/sync-repo-settings.yaml
@@ -79,6 +79,23 @@ branchProtectionRules:
- 'Kokoro - Test: Integration'
- cla/google
- OwlBot Post Processor
+ - pattern: 2.19.x
+ isAdminEnforced: true
+ requiredApprovingReviewCount: 1
+ requiresCodeOwnerReviews: true
+ requiresStrictStatusChecks: false
+ requiredStatusCheckContexts:
+ - dependencies (8)
+ - dependencies (11)
+ - lint
+ - clirr
+ - units (8)
+ - units (11)
+ - 'Kokoro - Test: Integration'
+ - cla/google
+ - OwlBot Post Processor
+ - 'Kokoro - Test: Java GraalVM Native Image'
+ - 'Kokoro - Test: Java 17 GraalVM Native Image'
permissionRules:
- team: api-bigquery
permission: admin
diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg
index a3f7fb9d4..e20330c3c 100644
--- a/.kokoro/presubmit/graalvm-native-17.cfg
+++ b/.kokoro/presubmit/graalvm-native-17.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17"
+ value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.0"
}
env_vars: {
diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg
index 4c7225ec9..0fd6ba2fa 100644
--- a/.kokoro/presubmit/graalvm-native.cfg
+++ b/.kokoro/presubmit/graalvm-native.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-kokoro-resources/graalvm"
+ value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.0"
}
env_vars: {
diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in
index 9cc4a1baa..a5010f77d 100644
--- a/.kokoro/requirements.in
+++ b/.kokoro/requirements.in
@@ -1,4 +1,4 @@
-gcp-docuploader==0.6.4
+gcp-docuploader==0.6.3
google-crc32c==1.3.0
googleapis-common-protos==1.56.3
gcp-releasetool==1.9.1
@@ -17,7 +17,7 @@ pycparser==2.21
pyperclip==1.8.2
python-dateutil==2.8.2
requests==2.27.1
-certifi==2022.9.24
+certifi==2022.12.7
importlib-metadata==4.8.3
zipp==3.6.0
google_api_core==2.8.2
@@ -30,5 +30,5 @@ zipp==3.6.0
rsa==4.9
six==1.16.0
attrs==22.1.0
-google-auth==2.14.0
+google-auth==2.14.1
idna==3.4
\ No newline at end of file
diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt
index 2dce197bf..15c404aa5 100644
--- a/.kokoro/requirements.txt
+++ b/.kokoro/requirements.txt
@@ -16,9 +16,9 @@ cachetools==4.2.4 \
# via
# -r requirements.in
# google-auth
-certifi==2022.9.24 \
- --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
- --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
+certifi==2022.12.7 \
+ --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
+ --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18
# via
# -r requirements.in
# requests
@@ -135,9 +135,9 @@ cryptography==38.0.3 \
# -r requirements.in
# gcp-releasetool
# secretstorage
-gcp-docuploader==0.6.4 \
- --hash=sha256:01486419e24633af78fd0167db74a2763974765ee8078ca6eb6964d0ebd388af \
- --hash=sha256:70861190c123d907b3b067da896265ead2eeb9263969d6955c9e0bb091b5ccbf
+gcp-docuploader==0.6.3 \
+ --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \
+ --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b
# via -r requirements.in
gcp-releasetool==1.9.1 \
--hash=sha256:952f4055d5d986b070ae2a71c4410b250000f9cc5a1e26398fcd55a5bbc5a15f \
@@ -150,9 +150,8 @@ google-api-core==2.8.2 \
# -r requirements.in
# google-cloud-core
# google-cloud-storage
-google-auth==2.14.0 \
- --hash=sha256:1ad5b0e6eba5f69645971abb3d2c197537d5914070a8c6d30299dfdb07c5c700 \
- --hash=sha256:cf24817855d874ede2efd071aa22125445f555de1685b739a9782fcf408c2a3d
+google-auth==2.14.1 \
+ --hash=sha256:f5d8701633bebc12e0deea4df8abd8aff31c28b355360597f7f2ee60f2e4d016
# via
# -r requirements.in
# gcp-releasetool
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2959a5a17..5c22cf03e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,30 @@
# Changelog
+## [2.20.0](https://github.com/googleapis/java-bigquery/compare/v2.19.1...v2.20.0) (2022-12-13)
+
+
+### Features
+
+* Add fast query path support when empty jobId object is passed ([#2349](https://github.com/googleapis/java-bigquery/issues/2349)) ([42c083a](https://github.com/googleapis/java-bigquery/commit/42c083ac680c657bf3f648fbce81004ecac8be87))
+* Next release from main branch is 2.20.0 ([#2405](https://github.com/googleapis/java-bigquery/issues/2405)) ([9297a43](https://github.com/googleapis/java-bigquery/commit/9297a4359f7b080a60b6bb5873edfd66cd7d2261))
+
+
+### Dependencies
+
+* Update arrow.version to v10.0.1 ([#2426](https://github.com/googleapis/java-bigquery/issues/2426)) ([aff9019](https://github.com/googleapis/java-bigquery/commit/aff901904d04a9a35042126a90e2a2826283a3e7))
+* Update cloud client dependencies ([#2444](https://github.com/googleapis/java-bigquery/issues/2444)) ([7255357](https://github.com/googleapis/java-bigquery/commit/7255357fc3bc715ebe15761acbe83c5e33495fdc))
+* Update dependency com.google.api.grpc:proto-google-cloud-bigqueryconnection-v1 to v2.8.0 ([#2418](https://github.com/googleapis/java-bigquery/issues/2418)) ([1ac1653](https://github.com/googleapis/java-bigquery/commit/1ac1653ed705fa7173c4a83ab37169fdb15422e3))
+* Update dependency com.google.api.grpc:proto-google-cloud-bigqueryconnection-v1 to v2.9.0 ([#2441](https://github.com/googleapis/java-bigquery/issues/2441)) ([01cc3c3](https://github.com/googleapis/java-bigquery/commit/01cc3c3d64884c2d7b68c5099de7c0959c1846db))
+* Update dependency com.google.apis:google-api-services-bigquery to v2-rev20221127-2.0.0 ([#2437](https://github.com/googleapis/java-bigquery/issues/2437)) ([eb52002](https://github.com/googleapis/java-bigquery/commit/eb52002919843ad9341d3f9b06c10e401637b82a))
+* Update dependency com.google.cloud:google-cloud-datacatalog-bom to v1.12.0 ([#2419](https://github.com/googleapis/java-bigquery/issues/2419)) ([c449031](https://github.com/googleapis/java-bigquery/commit/c4490315b62606371e134f2a9c2fbfabc60bee03))
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 ([#2435](https://github.com/googleapis/java-bigquery/issues/2435)) ([c99b215](https://github.com/googleapis/java-bigquery/commit/c99b21552e30a509b6220de7a491566dbab086db))
+* Update dependency com.google.cloud:google-cloud-storage to v2.15.1 ([#2420](https://github.com/googleapis/java-bigquery/issues/2420)) ([baf337a](https://github.com/googleapis/java-bigquery/commit/baf337a12e89af73db0c2494e61f271f32e44ed0))
+* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.18 ([#2424](https://github.com/googleapis/java-bigquery/issues/2424)) ([63b5196](https://github.com/googleapis/java-bigquery/commit/63b51969dc20747d3dd1f127cc0fcb2d27c9c8c0))
+* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 ([#2432](https://github.com/googleapis/java-bigquery/issues/2432)) ([396c6dc](https://github.com/googleapis/java-bigquery/commit/396c6dc101837a801c7f693f3a3548eb6685feaf))
+* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.18 ([#2425](https://github.com/googleapis/java-bigquery/issues/2425)) ([cd2ae9f](https://github.com/googleapis/java-bigquery/commit/cd2ae9f3d2c19be8a375e6be57a7e6b805b1ac4e))
+* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 ([#2433](https://github.com/googleapis/java-bigquery/issues/2433)) ([bf94087](https://github.com/googleapis/java-bigquery/commit/bf940878a7cf602b7f0736335653bc6c479e2df6))
+* Update jmh.version to v1.36 ([#2415](https://github.com/googleapis/java-bigquery/issues/2415)) ([0676586](https://github.com/googleapis/java-bigquery/commit/06765866bf4507f8f6ebbaee28e7dc698f9ba14c))
+
## [2.19.1](https://github.com/googleapis/java-bigquery/compare/v2.19.0...v2.19.1) (2022-11-08)
diff --git a/README.md b/README.md
index 1373ed0a8..7ffa4facb 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ See https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google
com.google.cloud
libraries-bom
- 26.1.4
+ 26.1.5
pom
import
@@ -44,7 +44,7 @@ If you are using Maven without BOM, add this to your dependencies:
com.google.cloud
google-cloud-bigquery
- 2.19.0
+ 2.19.1
```
@@ -52,20 +52,20 @@ If you are using Maven without BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:
```Groovy
-implementation platform('com.google.cloud:libraries-bom:26.1.4')
+implementation platform('com.google.cloud:libraries-bom:26.1.5')
implementation 'com.google.cloud:google-cloud-bigquery'
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-bigquery:2.19.0'
+implementation 'com.google.cloud:google-cloud-bigquery:2.19.1'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.19.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.19.1"
```
## Authentication
diff --git a/benchmark/pom.xml b/benchmark/pom.xml
index 857ff840f..bb0b93e16 100644
--- a/benchmark/pom.xml
+++ b/benchmark/pom.xml
@@ -6,12 +6,12 @@
google-cloud-bigquery-parent
com.google.cloud
- 2.19.1
+ 2.20.0
UTF-8
- 1.35
+ 1.36
benchmark
diff --git a/google-cloud-bigquery/pom.xml b/google-cloud-bigquery/pom.xml
index 4d172f93c..78d5997f7 100644
--- a/google-cloud-bigquery/pom.xml
+++ b/google-cloud-bigquery/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-bigquery
- 2.19.1
+ 2.20.0
jar
BigQuery
https://github.com/googleapis/java-bigquery
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-bigquery-parent
- 2.19.1
+ 2.20.0
google-cloud-bigquery
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java
index 01048689f..b5ca2e577 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java
@@ -1300,7 +1300,7 @@ public TableResult query(QueryJobConfiguration configuration, JobOption... optio
// If all parameters passed in configuration are supported by the query() method on the backend,
// put on fast path
QueryRequestInfo requestInfo = new QueryRequestInfo(configuration);
- if (requestInfo.isFastQuerySupported()) {
+ if (requestInfo.isFastQuerySupported(null)) {
String projectId = getOptions().getProjectId();
QueryRequest content = requestInfo.toPb();
return queryRpc(projectId, content, options);
@@ -1385,6 +1385,27 @@ public com.google.api.services.bigquery.model.QueryResponse call() {
public TableResult query(QueryJobConfiguration configuration, JobId jobId, JobOption... options)
throws InterruptedException, JobException {
Job.checkNotDryRun(configuration, "query");
+ // If all parameters passed in configuration are supported by the query() method on the backend,
+ // put on fast path
+ QueryRequestInfo requestInfo = new QueryRequestInfo(configuration);
+ if (requestInfo.isFastQuerySupported(jobId)) {
+ // Be careful when setting the projectID in JobId, if a projectID is specified in the JobId,
+ // the job created by the query method will use that project. This may cause the query to
+ // fail with "Access denied" if the project do not have enough permissions to run the job.
+
+ String projectId =
+ jobId.getProject() != null ? jobId.getProject() : getOptions().getProjectId();
+ QueryRequest content = requestInfo.toPb();
+ // Be careful when setting the location in JobId, if a location is specified in the JobId,
+ // the job created by the query method will be in that location, even if the table to be
+ // queried is in a different location. This may cause the query to fail with
+ // "BigQueryException: Not found"
+ if (jobId.getLocation() != null) {
+ content.setLocation(jobId.getLocation());
+ }
+
+ return queryRpc(projectId, content, options);
+ }
return create(JobInfo.of(jobId, configuration), options).getQueryResults();
}
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryRequestInfo.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryRequestInfo.java
index ccde465af..00a898363 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryRequestInfo.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryRequestInfo.java
@@ -57,7 +57,15 @@ final class QueryRequestInfo {
this.useQueryCache = config.useQueryCache();
}
- boolean isFastQuerySupported() {
+ boolean isFastQuerySupported(JobId jobId) {
+ // Fast query path is not possible if job is specified in the JobID object
+ // Respect Job field value in JobId specified by user.
+ // Specifying it will force the query to take the slower path.
+ if (jobId != null) {
+ if (jobId.getJob() != null) {
+ return false;
+ }
+ }
return config.getClustering() == null
&& config.getCreateDisposition() == null
&& config.getDestinationEncryptionConfiguration() == null
diff --git a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/QueryRequestInfoTest.java b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/QueryRequestInfoTest.java
index a62e3c0a0..456475597 100644
--- a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/QueryRequestInfoTest.java
+++ b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/QueryRequestInfoTest.java
@@ -150,8 +150,12 @@ public class QueryRequestInfoTest {
@Test
public void testIsFastQuerySupported() {
- assertEquals(false, REQUEST_INFO.isFastQuerySupported());
- assertEquals(true, REQUEST_INFO_SUPPORTED.isFastQuerySupported());
+ JobId jobIdSupported = JobId.newBuilder().build();
+ JobId jobIdNotSupported = JobId.newBuilder().setJob("random-job-id").build();
+ assertEquals(false, REQUEST_INFO.isFastQuerySupported(jobIdSupported));
+ assertEquals(true, REQUEST_INFO_SUPPORTED.isFastQuerySupported(jobIdSupported));
+ assertEquals(false, REQUEST_INFO.isFastQuerySupported(jobIdNotSupported));
+ assertEquals(false, REQUEST_INFO_SUPPORTED.isFastQuerySupported(jobIdNotSupported));
}
@Test
diff --git a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
index 4f72e7e66..52cb208c6 100644
--- a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
+++ b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
@@ -180,6 +180,7 @@ public class ITBigQueryTest {
private static final Long EXPIRATION_MS = 86400000L;
private static final Logger LOG = Logger.getLogger(ITBigQueryTest.class.getName());
private static final String DATASET = RemoteBigQueryHelper.generateDatasetName();
+ private static final String UK_DATASET = RemoteBigQueryHelper.generateDatasetName();
private static final String DESCRIPTION = "Test dataset";
private static final String OTHER_DATASET = RemoteBigQueryHelper.generateDatasetName();
private static final String MODEL_DATASET = RemoteBigQueryHelper.generateDatasetName();
@@ -533,6 +534,8 @@ public class ITBigQueryTest {
private static final TableId TABLE_ID = TableId.of(DATASET, "testing_table");
private static final TableId TABLE_ID_DDL = TableId.of(DATASET, "ddl_testing_table");
private static final TableId TABLE_ID_FASTQUERY = TableId.of(DATASET, "fastquery_testing_table");
+ private static final TableId TABLE_ID_FASTQUERY_UK =
+ TableId.of(UK_DATASET, "fastquery_testing_table");
private static final TableId TABLE_ID_LARGE = TableId.of(DATASET, "large_data_testing_table");
private static final TableId TABLE_ID_FASTQUERY_BQ_RESULTSET =
TableId.of(DATASET, "fastquery_testing_bq_resultset");
@@ -717,6 +720,7 @@ public static void beforeClass() throws InterruptedException, IOException {
DatasetInfo info3 =
DatasetInfo.newBuilder(ROUTINE_DATASET).setDescription("java routine lifecycle").build();
bigquery.create(info3);
+
LoadJobConfiguration configuration =
LoadJobConfiguration.newBuilder(
TABLE_ID, "gs://" + BUCKET + "/" + JSON_LOAD_FILE, FormatOptions.json())
@@ -781,6 +785,7 @@ public static void beforeClass() throws InterruptedException, IOException {
public static void afterClass() throws ExecutionException, InterruptedException {
if (bigquery != null) {
RemoteBigQueryHelper.forceDelete(bigquery, DATASET);
+ RemoteBigQueryHelper.forceDelete(bigquery, UK_DATASET);
RemoteBigQueryHelper.forceDelete(bigquery, MODEL_DATASET);
RemoteBigQueryHelper.forceDelete(bigquery, ROUTINE_DATASET);
}
@@ -3284,6 +3289,86 @@ public void testFastSQLQuery() throws InterruptedException {
}
}
+ @Test
+ public void testProjectIDFastSQLQueryWithJobId() throws InterruptedException {
+ String random_project_id = "RANDOM_PROJECT_" + UUID.randomUUID().toString().replace('-', '_');
+ System.out.println(random_project_id);
+ String query =
+ "SELECT TimestampField, StringField, BooleanField FROM " + TABLE_ID_FASTQUERY.getTable();
+ // With incorrect projectID in jobid
+ // The job will be created with the specified(incorrect) projectID
+ // hence failing the operation
+ JobId jobIdWithProjectId = JobId.newBuilder().setProject(random_project_id).build();
+ QueryJobConfiguration configSelect =
+ QueryJobConfiguration.newBuilder(query).setDefaultDataset(DatasetId.of(DATASET)).build();
+ try {
+ bigquery.query(configSelect, jobIdWithProjectId);
+ } catch (Exception exception) {
+ // error message for non-existent project
+ assertTrue(exception.getMessage().contains("Cannot parse as CloudRegion"));
+ assertEquals(BigQueryException.class, exception.getClass());
+ }
+ }
+
+ @Test
+ public void testLocationFastSQLQueryWithJobId() throws InterruptedException {
+ DatasetInfo infoUK =
+ DatasetInfo.newBuilder(UK_DATASET)
+ .setDescription(DESCRIPTION)
+ .setLocation("europe-west1")
+ .setLabels(LABELS)
+ .build();
+ bigquery.create(infoUK);
+
+ TableDefinition tableDefinition = StandardTableDefinition.of(SIMPLE_SCHEMA);
+ TableInfo tableInfo = TableInfo.newBuilder(TABLE_ID_FASTQUERY_UK, tableDefinition).build();
+ bigquery.create(tableInfo);
+
+ String insert =
+ "INSERT " + UK_DATASET + "." + TABLE_ID_FASTQUERY_UK.getTable() + " VALUES('Anna');";
+
+ QueryJobConfiguration config =
+ QueryJobConfiguration.newBuilder(insert)
+ .setDefaultDataset(DatasetId.of(UK_DATASET))
+ .build();
+ TableResult result = bigquery.query(config);
+ assertEquals(SIMPLE_SCHEMA, result.getSchema());
+ assertEquals(1, result.getTotalRows());
+ assertNull(result.getNextPage());
+ assertNull(result.getNextPageToken());
+ assertFalse(result.hasNextPage());
+ // Verify correctness of table content
+ for (FieldValueList row : result.getValues()) {
+ FieldValue stringCell = row.get(0);
+ assertEquals(stringCell, row.get("StringField"));
+ assertEquals("Anna", stringCell.getStringValue());
+ }
+ // With incorrect location in jobid
+ // The job will be created with the specified(incorrect) location
+ // hence failing the operation
+ String query = "SELECT StringField FROM " + TABLE_ID_FASTQUERY_UK.getTable();
+ JobId jobIdWithLocation = JobId.newBuilder().setLocation("us-west1").build();
+ QueryJobConfiguration configSelect =
+ QueryJobConfiguration.newBuilder(query).setDefaultDataset(DatasetId.of(UK_DATASET)).build();
+ try {
+ bigquery.query(configSelect, jobIdWithLocation);
+ } catch (BigQueryException exception) {
+ assertTrue(exception.getMessage().contains("Not found"));
+ assertEquals(BigQueryException.class, exception.getClass());
+ }
+
+ // Without location in jobID, the query job defaults to the location of the dataset
+ JobId jobIdNoLocation = JobId.newBuilder().build();
+ QueryJobConfiguration configNoLocation =
+ QueryJobConfiguration.newBuilder(query).setDefaultDataset(DatasetId.of(UK_DATASET)).build();
+ TableResult resultNoLocation = bigquery.query(configNoLocation, jobIdNoLocation);
+ for (FieldValueList row : resultNoLocation.getValues()) {
+ FieldValue stringCell = row.get(0);
+ assertEquals(stringCell, row.get("StringField"));
+ assertEquals("Anna", stringCell.getStringValue());
+ }
+ }
+
/* TODO(prasmish): replicate the entire test case for executeSelect */
@Test
public void testFastSQLQueryMultiPage() throws InterruptedException {
@@ -4219,7 +4304,7 @@ public void testQueryJob() throws InterruptedException, TimeoutException {
statistics.getBiEngineStats().getBiEngineReasons().get(0).getCode(), "OTHER_REASON");
assertEquals(
statistics.getBiEngineStats().getBiEngineReasons().get(0).getMessage(),
- "Query output to destination table is not supported.");
+ "Only SELECT queries without a destination table can be accelerated.");
}
assertNotNull(statistics.getQueryPlan());
}
diff --git a/pom.xml b/pom.xml
index 1883b2ffd..0f7fcfbdb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-bigquery-parent
pom
- 2.19.1
+ 2.20.0
BigQuery Parent
https://github.com/googleapis/java-bigquery
@@ -14,7 +14,7 @@
com.google.cloud
google-cloud-shared-config
- 1.5.4
+ 1.5.5
@@ -53,9 +53,9 @@
UTF-8
github
google-cloud-bigquery-parent
- v2-rev20221028-2.0.0
- 3.0.6
- 10.0.0
+ v2-rev20221127-2.0.0
+ 3.1.0
+ 10.0.1
@@ -72,7 +72,7 @@
com.google.cloud
google-cloud-bigquerystorage-bom
- 2.24.2
+ 2.27.0
pom
import
@@ -96,7 +96,7 @@
com.google.cloud
google-cloud-datacatalog-bom
- 1.11.0
+ 1.13.0
pom
import
@@ -110,7 +110,7 @@
com.google.cloud
google-cloud-bigquery
- 2.19.1
+ 2.20.0
@@ -148,25 +148,25 @@
org.mockito
mockito-core
- 4.8.1
+ 4.9.0
test
com.google.cloud
google-cloud-storage
- 2.15.0
+ 2.16.0
test
com.google.cloud
google-cloud-bigqueryconnection
- 2.7.0
+ 2.9.0
test
com.google.api.grpc
proto-google-cloud-bigqueryconnection-v1
- 2.7.0
+ 2.9.0
test
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 50502e9f1..93948d4fa 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -45,7 +45,7 @@
com.google.cloud
google-cloud-bigquery
- 2.19.0
+ 2.19.1
@@ -63,13 +63,13 @@
com.google.cloud
google-cloud-bigtable
- 2.15.0
+ 2.17.1
test
com.google.cloud
google-cloud-bigqueryconnection
- 2.7.0
+ 2.9.0
test
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index fac75990e..4962e9b0e 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -39,7 +39,7 @@
com.google.cloud
libraries-bom
- 26.1.4
+ 26.1.5
pom
import
@@ -99,7 +99,7 @@
org.graalvm.buildtools
junit-platform-native
- 0.9.17
+ 0.9.19
test
@@ -121,7 +121,7 @@
org.graalvm.buildtools
native-maven-plugin
- 0.9.17
+ 0.9.19
true
com.example.bigquery.NativeImageBigquerySample
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index d35fbbdef..e27ce4166 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -44,7 +44,7 @@
com.google.cloud
google-cloud-bigquery
- 2.19.1
+ 2.20.0
@@ -61,13 +61,13 @@
com.google.cloud
google-cloud-bigtable
- 2.15.0
+ 2.17.1
test
com.google.cloud
google-cloud-bigqueryconnection
- 2.7.0
+ 2.9.0
test
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 4c4ad69f9..99ac67315 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -47,7 +47,7 @@
com.google.cloud
libraries-bom
- 26.1.4
+ 26.1.5
pom
import
@@ -79,13 +79,13 @@
com.google.cloud
google-cloud-bigtable
- 2.15.0
+ 2.17.1
test
com.google.cloud
google-cloud-bigqueryconnection
- 2.7.0
+ 2.9.0
test
diff --git a/versions.txt b/versions.txt
index 9201e3853..400df5cbf 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,4 +1,4 @@
# Format:
# module:released-version:current-version
-google-cloud-bigquery:2.19.1:2.19.1
\ No newline at end of file
+google-cloud-bigquery:2.20.0:2.20.0
\ No newline at end of file