apache / apache/fluss

Support alter table config while adding partition name prefix for auto partition table

Open
#380 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
625
Avg merge
3d 14h
Merged PRs (30d)
97

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/alibaba/fluss/issues) and found nothing similar.

### Motivation

In feature https://github.com/alibaba/fluss/issues/195, we will support multi field partition table. To support this for auto partition table, we will add a table config to storage partition name prefix.

For example:
If we have an auto partition table with partition keys as ['country', 'city', 'ds'], and pre-create 2 partitions, the 'ds' column will be as auto partition spec to trigger auto partitioning, and we need to pre-define the partition name prefix. Such as if we pre-define the partition name prefixes ['China', 'Beijing'], ['China', 'Shanghai'], when trigger auto partitioning, we will generate four partitions named ['China', 'Beijing', '20240211'], ['China', 'Shanghai', '20240211'], ['China', 'Beijing', '20240212'], ['China', 'Shanghai', '20240212'].

In the future, we also try to support change the partition name prefix by `addPartition` request. So we need to support alter table config in this pr.

### Solution

_No response_

### Anything else?

_No response_

### Willingness to contribute

- [x] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the alter table configuration path and the addPartition request mentioned in the issue, then inspect how auto partition tables currently generate partition names. Confirm how multi-field partition keys and pre-defined prefixes are represented before defining the configuration change. Done means alter table accepts the required prefix configuration and auto-partition generation preserves the specified prefixes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.