Skip to content

Use Schema.Builder#fromSchema in SchemaUpdate #2344

@wuchong

Description

@wuchong

Search before asking

  • I searched in the issues and found nothing similar.

Description

Currently, SchemaUpdate maintains schema members (primary keys, columns, auto-incr fields), which is very error-prone, leading to missing schema members when we evolve the schema structure and resulting in a broken schema after schema evolution.

I suggest to directly maintain Schema.Builder in SchemaUpdate and delegating all schema changes to Schema.Builder. This help us to only maintain one logic of schema building and validation. 降低出问题的可能性。

Besides, the Schema.Builder#fromSchema should also be updated if needed.

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions