[server] Support configurable time partition format for auto-partitioned tables#3200
Open
wattt3 wants to merge 3 commits into
Open
[server] Support configurable time partition format for auto-partitioned tables#3200wattt3 wants to merge 3 commits into
wattt3 wants to merge 3 commits into
Conversation
Author
|
@luoyuxia PTAL, thanks. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new table option to customize the string format used for time-based auto-partition values, propagating that option through partition generation/retention logic and documenting the new behavior.
Changes:
- Introduce
table.auto-partition.time-format(no default; derived fromtime-unitwhen unset) and wire it into auto-partition creation and retention. - Validate custom time format pattern syntax during table descriptor validation, with new unit tests.
- Update docs and existing tests/call sites for updated partition utility APIs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/table-design/data-distribution/partitioning.md | Documents the new table.auto-partition.time-format option for auto-partitioned tables. |
| website/docs/engine-flink/options.md | Exposes the new option in Flink engine table options documentation. |
| fluss-server/src/test/java/org/apache/fluss/server/utils/TableDescriptorValidationTest.java | Adds coverage for accepting/rejecting custom time-format values at table creation validation time. |
| fluss-server/src/test/java/org/apache/fluss/server/coordinator/TableManagerITCase.java | Updates test helper call site for new generateAutoPartition(...) signature. |
| fluss-server/src/main/java/org/apache/fluss/server/utils/TableDescriptorValidation.java | Adds table-create-time validation for time-format pattern syntax. |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/AutoPartitionManager.java | Passes time-format through to partition pre-creation and retention cutoff calculation. |
| fluss-common/src/test/java/org/apache/fluss/utils/PartitionUtilsTest.java | Adds tests for partition name generation with a custom time format. |
| fluss-common/src/main/java/org/apache/fluss/utils/PartitionUtils.java | Extends partition time generation/validation to accept an optional custom time-format and uses Locale.ROOT. |
| fluss-common/src/main/java/org/apache/fluss/utils/AutoPartitionStrategy.java | Adds timeFormat to the resolved auto-partition strategy from table options. |
| fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java | Defines the new table.auto-partition.time-format config option and its description. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
@luoyuxia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #3191
Brief change log
table.auto-partition.time-formatto override the unit partition value formatTests
API and Format
Documentation