You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "TanuSharma2511 (via GitHub)" <gi...@apache.org> on 2025/07/30 07:22:12 UTC

[PR] Adding time partitioning support for python storage write api [beam]

TanuSharma2511 opened a new pull request, #35737:
URL: https://github.com/apache/beam/pull/35737

   It resolves a part of #35329 
   
   1.Dynamic Time Partitioning is not supported yet. It makes sense to support dynamic Time Partitioning after we support dynamic schema for Python Bigquery Storage Write API.
   2.Time Partitioning Support for Bigquery Managed IO.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/actions/workflows/build_wheels.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/actions/workflows/python_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/actions/workflows/java_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/actions/workflows/go_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "TanuSharma2511 (via GitHub)" <gi...@apache.org>.
TanuSharma2511 commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3269679640

   Run Yaml_Xlang_Direct PreCommit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "TanuSharma2511 (via GitHub)" <gi...@apache.org>.
TanuSharma2511 commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3153066758

   @ahmedabu98 @shunping 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3681968869

   This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3242139804

   Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment `assign to next reviewer`:
   
   R: @tvalentyn for label python.
   R: @kennknowles for label java.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3135464763

   Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment `assign set of reviewers`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "ng-oliver (via GitHub)" <gi...@apache.org>.
ng-oliver commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3946210460

   is there any chance we can resurrect this? this features remains very useful when loading data into bigquery via `storage_write_api`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #35737:
URL: https://github.com/apache/beam/pull/35737#discussion_r2285918594


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryWriteConfiguration.java:
##########
@@ -58,6 +59,41 @@ public abstract static class Builder {
     }
   }
 
+  @AutoValue
+  public abstract static class TimePartitioningConfig implements Serializable {
+    @SchemaFieldDescription("The time partitioning type.")
+    public abstract @Nullable String getType();
+
+    @SchemaFieldDescription(
+        "If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is partitioned by this field.")
+    public abstract @Nullable String getField();

Review Comment:
   Can we do some validation that this field exists in the input PCollection Schema? Maybe in the constructor of `PortableBigQueryDestinations`



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/PortableBigQueryDestinations.java:
##########
@@ -83,9 +87,40 @@ public String getDestination(@Nullable ValueInSingleWindow<Row> element) {
   @Override
   public TableDestination getTable(String destination) {
 
+    TimePartitioning timePartitioning = null;
+
+    if (timePartitioningConfig != null) {
+      String type = timePartitioningConfig.getType();
+      String field = timePartitioningConfig.getField();
+      Long expirationMs = timePartitioningConfig.getExpirationMs();
+      Boolean requirePartitionFilter = timePartitioningConfig.getRequirePartitionFilter();
+
+      if (type == null) {
+        throw new IllegalArgumentException(
+            "TimePartitioning 'type' must be specified (DAY, HOUR, MONTH, or YEAR).");
+      }

Review Comment:
   Just remove @Nullable from getType() in the configuration above and you won't need this.
   
   But please add extra logic to make sure the value of "type" is one of {DAY, HOUR, MONTH, YEAR}



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "TanuSharma2511 (via GitHub)" <gi...@apache.org>.
TanuSharma2511 commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3272723564

   Run Python_ML PreCommit 3.9


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3227958060

   Reminder, please take a look at this pr: @jrmccluskey @Abacn 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on code in PR #35737:
URL: https://github.com/apache/beam/pull/35737#discussion_r2241764205


##########
sdks/python/apache_beam/io/external/xlang_bigqueryio_it_test.py:
##########
@@ -96,17 +99,19 @@ class BigQueryXlangStorageWriteIT(unittest.TestCase):
           "str": "d",
           "bool": False,
           "bytes": b'd',
-          "timestamp": Timestamp(4000, 400)
+          "timestamp": Timestamp(4000, 400),
+          "event_time": Timestamp(1722383999)
       }
   ]
   ALL_TYPES_SCHEMA = (
       "int:INTEGER,float:FLOAT,numeric:NUMERIC,str:STRING,"
-      "bool:BOOLEAN,bytes:BYTES,timestamp:TIMESTAMP")
+      "bool:BOOLEAN,bytes:BYTES,timestamp:TIMESTAMP,event_time:TIMESTAMP")
 
   def setUp(self):
     self.test_pipeline = TestPipeline(is_integration_test=True)
     self.args = self.test_pipeline.get_full_options_as_args()
-    self.project = self.test_pipeline.get_option('project')
+    # self.project = self.test_pipeline.get_option('project')
+    self.project = "tanusharmaa"

Review Comment:
   ![critical](https://www.gstatic.com/codereviewagent/critical.svg)
   
   Hardcoding the project name will cause this test to fail for other developers and in the CI environment. Please revert this to use the project from the pipeline options.
   
   ```suggestion
       self.project = self.test_pipeline.get_option('project')
   ```



##########
sdks/python/apache_beam/io/gcp/bigquery.py:
##########
@@ -2702,13 +2702,17 @@ def expand(self, input):
       table = StorageWriteToBigQuery.DYNAMIC_DESTINATIONS
 
     clustering_fields = []
+    time_partitioning_config= {}

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   Initializing `time_partitioning_config` to an empty dictionary `{}` can lead to a runtime error. If `self.additional_bq_parameters` is not provided, `time_partitioning_config` will remain `{}`. This empty map will be passed to the Java transform, which will likely interpret it as a non-null configuration object with all fields null. This will cause an `IllegalArgumentException` in `PortableBigQueryDestinations` because the partitioning `type` will be missing.
   
   To fix this, please initialize `time_partitioning_config` to `None`.
   
   ```suggestion
       time_partitioning_config = None
   ```



##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryManagedIT.java:
##########
@@ -73,20 +73,27 @@ public class BigQueryManagedIT {
           Schema.Field.of("number", Schema.FieldType.INT64),
           Schema.Field.of("dest", Schema.FieldType.INT64));
 
+  // Schema.Field.of("field_date", Schema.FieldType.DATETIME)

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   This commented-out code, and the one on line 81, seem to be for debugging or future work. Please remove them before merging.



##########
website/www/site/content/en/documentation/io/managed-io.md:
##########
@@ -811,6 +811,18 @@ For more information on table properties, please visit https://iceberg.apache.or
         Determines how often to 'commit' progress into BigQuery. Default is every 5 seconds.
       </td>
     </tr>
+    <tr>
+      <td>
+        Time Partitiong

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   There's a typo here. It should be 'Partitioning'.
   
   ```suggestion
           Time Partitioning
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3188246948

   Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment `assign to next reviewer`:
   
   R: @jrmccluskey for label python.
   R: @Abacn for label java.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3179076358

   Reminder, please take a look at this pr: @shunping @robertwb 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3139430451

   Assigning reviewers:
   
   R: @shunping for label python.
   R: @robertwb for label java.
   
   
   Note: If you would like to opt out of this review, comment `assign to next reviewer`.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
   
   The PR bot will only process comments in the main thread (not review comments).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "TanuSharma2511 (via GitHub)" <gi...@apache.org>.
TanuSharma2511 commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3149645438

   Java Unit Tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "TanuSharma2511 (via GitHub)" <gi...@apache.org>.
TanuSharma2511 commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3273282343

   Run Python_ML PreCommit 3.12


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "TanuSharma2511 (via GitHub)" <gi...@apache.org>.
TanuSharma2511 commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3269951332

   Run Python PreCommit 3.11


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3271609094

   R: @ahmedabu98 since you reviewed before


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3403623735

   @TanuSharma2511 please respond here once it's ready for the next review iteration/merge. thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3650910504

   This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #35737: Adding time partitioning support for python storage write api
URL: https://github.com/apache/beam/pull/35737


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "TanuSharma2511 (via GitHub)" <gi...@apache.org>.
TanuSharma2511 commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3273016496

   Run Python_ML PreCommit 3.12


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3271612444

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment `assign set of reviewers`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "TanuSharma2511 (via GitHub)" <gi...@apache.org>.
TanuSharma2511 commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3273040548

   Run Python_ML PreCommit 3.11


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "stankiewicz (via GitHub)" <gi...@apache.org>.
stankiewicz commented on PR #35737:
URL: https://github.com/apache/beam/pull/35737#issuecomment-3333558628

   @ahmedabu98 can you take a look at latest changes?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding time partitioning support for python storage write api [beam]

Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #35737:
URL: https://github.com/apache/beam/pull/35737#discussion_r2388836109


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/PortableBigQueryDestinations.java:
##########
@@ -95,9 +112,12 @@ public TableDestination getTable(String destination) {
       Long expirationMs = timePartitioningConfig.getExpirationMs();
       Boolean requirePartitionFilter = timePartitioningConfig.getRequirePartitionFilter();
 
-      if (type == null) {
+      Set<String> allowedTypes = new HashSet<>(Arrays.asList("DAY", "HOUR", "MONTH", "YEAR"));

Review Comment:
   nit: this should be a final static class variable



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org