Skip to content

Conversation

@loserwang1024
Copy link
Contributor

@loserwang1024 loserwang1024 commented Nov 24, 2025

Purpose

Linked issue: close #2056

Brief change log

Tests

API and Format

Documentation


public Column(String columnName, DataType dataType) {
this(columnName, dataType, null);
this(columnName, dataType, null, UNKNOWN_COLUMN_ID);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to get the column id for the previous schema (use the column order). Using -1 as default column is error-prone.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I also want to do it. But as a public api, I cannot remove this constructor Column(String columnName, DataType dataType). If not set -1, I have no idea how to handle it.

/** Register schema to ZK metadata and return the schema id. */
public int registerSchema(TablePath tablePath, Schema schema) throws Exception {
int currentSchemaId = getCurrentSchemaId(tablePath);
return registerSchema(tablePath, schema, getCurrentSchemaId(tablePath) + 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is creating a new table, we can directly use schema id = 1 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

sometime schema will be recreated when create table.

@loserwang1024 loserwang1024 force-pushed the poc-schema-change branch 3 times, most recently from 279a97d to 2ade0ce Compare November 27, 2025 02:19
@loserwang1024 loserwang1024 force-pushed the poc-schema-change branch 4 times, most recently from 4277102 to d490cb1 Compare November 30, 2025 06:14
@loserwang1024 loserwang1024 changed the title [DRAFT] Fluss Support Schema evolution. Support Add Column in Fluss. Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fluss Support Add column

3 participants