diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java index 9a76b7100..4b09fe3c4 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/StandardTableDefinition.java @@ -157,7 +157,7 @@ public abstract static class Builder /** * Set the clustering configuration for the table. If not set, the table is not clustered. - * Clustering is only available for partitioned tables. + * BigQuery supports clustering for both partitioned and non-partitioned tables. */ public abstract Builder setClustering(Clustering clustering); diff --git a/samples/snippets/src/main/java/com/example/bigquery/CreateClusteredTable.java b/samples/snippets/src/main/java/com/example/bigquery/CreateClusteredTable.java index 3ea3318b7..dd36385c7 100644 --- a/samples/snippets/src/main/java/com/example/bigquery/CreateClusteredTable.java +++ b/samples/snippets/src/main/java/com/example/bigquery/CreateClusteredTable.java @@ -55,7 +55,7 @@ public static void createClusteredTable( TimePartitioning partitioning = TimePartitioning.of(TimePartitioning.Type.DAY); // Clustering fields will be consisted of fields mentioned in the schema. - // As of now, another condition is that the table should be partitioned. + // BigQuery supports clustering for both partitioned and non-partitioned tables. Clustering clustering = Clustering.newBuilder().setFields(clusteringFields).build(); StandardTableDefinition tableDefinition = diff --git a/samples/snippets/src/main/java/com/example/bigquery/LoadTableClustered.java b/samples/snippets/src/main/java/com/example/bigquery/LoadTableClustered.java index 118e356e5..86b8afc7a 100644 --- a/samples/snippets/src/main/java/com/example/bigquery/LoadTableClustered.java +++ b/samples/snippets/src/main/java/com/example/bigquery/LoadTableClustered.java @@ -65,7 +65,7 @@ public static void loadTableClustered( TimePartitioning partitioning = TimePartitioning.of(TimePartitioning.Type.DAY); // Clustering fields will be consisted of fields mentioned in the schema. - // As of now, another condition is that the table should be partitioned. + // BigQuery supports clustering for both partitioned and non-partitioned tables. Clustering clustering = Clustering.newBuilder().setFields(clusteringFields).build(); LoadJobConfiguration loadJobConfig =