-
Notifications
You must be signed in to change notification settings - Fork 437
[kv/auto increment column] add auto increment column in Fluss schema #1887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| private Schema( | ||
| List<Column> columns, | ||
| @Nullable PrimaryKey primaryKey, | ||
| @Nullable String autoIncrementColumn) { | ||
| this.columns = normalizeColumns(columns, primaryKey, autoIncrementColumn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it’s cleaner to store auto-increment column information at the Schema level rather than within individual Column objects. This aligns with how primary keys are currently modeled and makes it straightforward to retrieve the full set of auto-increment columns without iterating over all columns.
Additionally, adding new fields to Column would require multiple constructor overloads, unnecessarily complicating the API.
Given that we may eventually support multiple auto-increment columns, I propose using List<String> (e.g., Schema#getAutoIncrementColumnNames()) instead of a single @Nullable String.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. It's true that adding extra fields in Column complicates its API. Comments addressed.
@xx789633 I'v created a subtask issue #2103 and linked to the umbrella issue #1886 |
|
Hi @xx789633 , Please do not use "git merge" to merge branches, otherwise the changes is hard to track and review. Please use "git rebase" to rebase branches instead. IntelliJ IDEA provide an easy tool to do git rebase, you can find the tool via |
70bac12 to
1b90085
Compare
Purpose
Linked issue: close #2103
Brief change log
Tests
API and Format
Documentation