diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml
new file mode 100644
index 000000000..25ba59a0f
--- /dev/null
+++ b/.github/sync-repo-settings.yaml
@@ -0,0 +1,52 @@
+# Whether or not rebase-merging is enabled on this repository.
+# Defaults to `true`
+rebaseMergeAllowed: true
+
+# Whether or not squash-merging is enabled on this repository.
+# Defaults to `true`
+squashMergeAllowed: true
+
+# Whether or not PRs are merged with a merge commit on this repository.
+# Defaults to `false`
+mergeCommitAllowed: false
+
+# Rules for master branch protection
+branchProtectionRules:
+# Identifies the protection rule pattern. Name of the branch to be protected.
+# Defaults to `master`
+- pattern: master
+ # Can admins overwrite branch protection.
+ # Defaults to `true`
+ isAdminEnforced: true
+ # Number of approving reviews required to update matching branches.
+ # Defaults to `1`
+ requiredApprovingReviewCount: 1
+ # Are reviews from code owners required to update matching branches.
+ # Defaults to `false`
+ requiresCodeOwnerReviews: true
+ # Require up to date branches
+ requiresStrictStatusChecks: false
+ # List of required status check contexts that must pass for commits to be accepted to matching branches.
+ requiredStatusCheckContexts:
+ - "dependencies (8)"
+ - "dependencies (11)"
+ - "linkage-monitor"
+ - "lint"
+ - "clirr"
+ - "units (7)"
+ - "units (8)"
+ - "units (11)"
+ - "Kokoro - Test: Integration"
+ - "cla/google"
+# List of explicit permissions to add (additive only)
+permissionRules:
+# Team slug to add to repository permissions
+- team: api-bigquery
+ # Access level required, one of push|pull|admin|maintain|triage
+ permission: maintain
+- team: yoshi-java
+ permission: push
+- team: yoshi-admins
+ permission: admin
+- team: yoshi-java-admins
+ permission: admin
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ea74195f7..359b93c25 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## [1.119.0](https://www.github.com/googleapis/java-bigquery/compare/v1.118.0...v1.119.0) (2020-09-17)
+
+
+### Features
+
+* add additional time partitioning intervals ([#737](https://www.github.com/googleapis/java-bigquery/issues/737)) ([a57dbdf](https://www.github.com/googleapis/java-bigquery/commit/a57dbdf96440bc7e51443efb99b007ac42cd481b))
+
## [1.118.0](https://www.github.com/googleapis/java-bigquery/compare/v1.117.2...v1.118.0) (2020-09-17)
diff --git a/README.md b/README.md
index 3c7829207..583de967a 100644
--- a/README.md
+++ b/README.md
@@ -49,11 +49,11 @@ If you are using Maven without BOM, add this to your dependencies:
If you are using Gradle, add this to your dependencies
```Groovy
-compile 'com.google.cloud:google-cloud-bigquery:1.118.0'
+compile 'com.google.cloud:google-cloud-bigquery:1.119.0'
```
If you are using SBT, add this to your dependencies
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.118.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.119.0"
```
[//]: # ({x-version-update-end})
diff --git a/benchmark/pom.xml b/benchmark/pom.xml
index 8992a294d..c041f81fb 100644
--- a/benchmark/pom.xml
+++ b/benchmark/pom.xml
@@ -6,7 +6,7 @@
google-cloud-bigquery-parent
com.google.cloud
- 1.118.0
+ 1.119.0
diff --git a/google-cloud-bigquery/pom.xml b/google-cloud-bigquery/pom.xml
index c7752f168..fbcd5f4c8 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
- 1.118.0
+ 1.119.0
jar
BigQuery
https://github.com/googleapis/java-bigquery
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-bigquery-parent
- 1.118.0
+ 1.119.0
google-cloud-bigquery
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TimePartitioning.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TimePartitioning.java
index f37377552..e874bc30b 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TimePartitioning.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TimePartitioning.java
@@ -37,16 +37,20 @@ public abstract class TimePartitioning implements Serializable {
private static final long serialVersionUID = -8565064035346940951L;
/**
- * The supported types are DAY, which will generate one partition per day, and HOUR, which will
- * generate one partition per hour. (Providing an empty string used to cause an error, but in
- * OnePlatform the field will be treated as unset.)
+ * [Optional] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one
+ * partition per day, hour, month, and year, respectively. When the interval is not specified, the
+ * default behavior is DAY.
*/
public enum Type {
- /** Table is partitioned per day, based on data loading time. */
+ /** Table is partitioned per day. */
DAY,
- /** Table is partitioned per hour, based on data loading time. */
- HOUR
+ /** Table is partitioned per hour. */
+ HOUR,
+ /** Table is partitioned per month. */
+ MONTH,
+ /** Table is partitioned per year. */
+ YEAR
}
TimePartitioning() {
diff --git a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/TimePartitioningTest.java b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/TimePartitioningTest.java
index ee7f5dde6..1e48c817e 100644
--- a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/TimePartitioningTest.java
+++ b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/TimePartitioningTest.java
@@ -29,6 +29,8 @@ public class TimePartitioningTest {
private static final Type TYPE_DAY = Type.DAY;
private static final Type TYPE_HOUR = Type.HOUR;
+ private static final Type TYPE_MONTH = Type.MONTH;
+ private static final Type TYPE_YEAR = Type.YEAR;
private static final long EXPIRATION_MS = 42;
private static final boolean REQUIRE_PARTITION_FILTER = false;
private static final String FIELD = "field";
@@ -44,11 +46,25 @@ public class TimePartitioningTest {
.setRequirePartitionFilter(REQUIRE_PARTITION_FILTER)
.setField(FIELD)
.build();
+ private static final TimePartitioning TIME_PARTITIONING_MONTH =
+ TimePartitioning.newBuilder(TYPE_MONTH)
+ .setExpirationMs(EXPIRATION_MS)
+ .setRequirePartitionFilter(REQUIRE_PARTITION_FILTER)
+ .setField(FIELD)
+ .build();
+ private static final TimePartitioning TIME_PARTITIONING_YEAR =
+ TimePartitioning.newBuilder(TYPE_YEAR)
+ .setExpirationMs(EXPIRATION_MS)
+ .setRequirePartitionFilter(REQUIRE_PARTITION_FILTER)
+ .setField(FIELD)
+ .build();
@Test
public void testOf() {
assertEquals(TYPE_DAY, TIME_PARTITIONING_DAY.getType());
assertEquals(TYPE_HOUR, TIME_PARTITIONING_HOUR.getType());
+ assertEquals(TYPE_MONTH, TIME_PARTITIONING_MONTH.getType());
+ assertEquals(TYPE_YEAR, TIME_PARTITIONING_YEAR.getType());
assertEquals(EXPIRATION_MS, TIME_PARTITIONING_DAY.getExpirationMs().longValue());
assertEquals(REQUIRE_PARTITION_FILTER, TIME_PARTITIONING_DAY.getRequirePartitionFilter());
assertEquals(FIELD, TIME_PARTITIONING_DAY.getField());
diff --git a/pom.xml b/pom.xml
index d4196305e..bb82c89fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-bigquery-parent
pom
- 1.118.0
+ 1.119.0
BigQuery Parent
https://github.com/googleapis/java-bigquery
@@ -86,7 +86,7 @@
com.google.cloud
google-cloud-bigquery
- 1.118.0
+ 1.119.0
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index aeb83151e..374a46f6e 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -44,7 +44,7 @@
com.google.cloud
google-cloud-bigquery
- 1.118.0
+ 1.119.0
diff --git a/versions.txt b/versions.txt
index 6d310375d..7f8c97d8e 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,4 +1,4 @@
# Format:
# module:released-version:current-version
-google-cloud-bigquery:1.118.0:1.118.0
\ No newline at end of file
+google-cloud-bigquery:1.119.0:1.119.0
\ No newline at end of file