From aa39fd4a6e31fc85a5b04649f30b27bca1c82c9a Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Mon, 11 Jun 2018 12:52:17 -0700 Subject: [PATCH 1/2] Removes old sample bigquery_query_standard has been removed because it is no longer being used in the docs. (a combination of bigquery_query and bigquery_query_legacy are being used instead) --- .../bigquery/snippets/CloudSnippets.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CloudSnippets.java b/google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CloudSnippets.java index 77ffa2f133f2..1d910ac87e78 100644 --- a/google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CloudSnippets.java +++ b/google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/CloudSnippets.java @@ -71,27 +71,6 @@ public void runLegacySqlQuery() throws InterruptedException { // [END bigquery_query_legacy] } - /** - * Example of running a query with Standard SQL explicitly set. - */ - public void runStandardSqlQuery() throws InterruptedException { - // [START bigquery_query_standard] - // BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService(); - String query = "SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;"; - QueryJobConfiguration queryConfig = - // Note that setUseLegacySql is set to false by default - QueryJobConfiguration.newBuilder(query).setUseLegacySql(false).build(); - - // Print the results. - for (FieldValueList row : bigquery.query(queryConfig).iterateAll()) { - for (FieldValue val : row) { - System.out.printf("%s,", val.toString()); - } - System.out.printf("\n"); - } - // [END bigquery_query_standard] - } - /** * Example of running a query and saving the results to a table. */ From c04982e49e01f55be997bc530d04f48ab4373374 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Mon, 11 Jun 2018 13:00:12 -0700 Subject: [PATCH 2/2] Removes bigquery_query_standard test --- .../cloud/examples/bigquery/snippets/ITCloudSnippets.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/google-cloud-examples/src/test/java/com/google/cloud/examples/bigquery/snippets/ITCloudSnippets.java b/google-cloud-examples/src/test/java/com/google/cloud/examples/bigquery/snippets/ITCloudSnippets.java index fbd7b3667d1d..08dd9289ef43 100644 --- a/google-cloud-examples/src/test/java/com/google/cloud/examples/bigquery/snippets/ITCloudSnippets.java +++ b/google-cloud-examples/src/test/java/com/google/cloud/examples/bigquery/snippets/ITCloudSnippets.java @@ -62,13 +62,6 @@ public void testRunLegacySqlQuery() throws InterruptedException { assertTrue(got.contains("romeoandjuliet")); } - @Test - public void testRunStandardSqlQuery() throws InterruptedException { - cloudSnippets.runStandardSqlQuery(); - String got = bout.toString(); - assertTrue(got.contains("romeoandjuliet")); - } - @Test public void testRunQueryPermanentTable() throws InterruptedException { String tableName = "test_destination_table";