Skip to content
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

refactor(frontend): generate replace plan without relying on definition #19866

Draft
wants to merge 3 commits into
base: bz/extract-create-table-args-4
Choose a base branch
from

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Dec 19, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Note: the diff can be outdated due to ongoing prerequisite refactoring.

We used to rely on the definition when re-planning the table for purposes like schema change or sink-into-table. However, maintaining column definitions can be hard, especially for the schemas resolved from registry.

This PR is a attempt to generate replace plan without relying on persisted definition, but directly retrieve necessary info from the internal representation (TableCatalog).

To accomplish this, we need to refactor the procedure for generating a plan from a CREATE TABLE SQL statement, so that we can reuse as much code as possible when it comes to generating a plan from an existing Table.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • My PR contains critical fixes that are necessary to be merged into the latest release.

Documentation

  • My PR needs documentation updates.
Release note

Copy link
Member Author

BugenZhao commented Dec 24, 2024

@BugenZhao BugenZhao force-pushed the bz/extract-create-table-args-3 branch from 04928f1 to 8d19f9f Compare December 26, 2024 05:12
@BugenZhao BugenZhao force-pushed the bz/replace-table-without-dep-on-definition branch from 30ebff0 to 3fea156 Compare December 26, 2024 05:12
@BugenZhao BugenZhao force-pushed the bz/extract-create-table-args-3 branch from 8d19f9f to 9f28773 Compare December 26, 2024 06:00
@BugenZhao BugenZhao force-pushed the bz/replace-table-without-dep-on-definition branch from 3fea156 to 84b375f Compare December 26, 2024 06:01
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
@BugenZhao BugenZhao force-pushed the bz/extract-create-table-args-3 branch from 9f28773 to b8e0b14 Compare December 26, 2024 07:40
@BugenZhao BugenZhao force-pushed the bz/replace-table-without-dep-on-definition branch from 84b375f to df6bd1c Compare December 26, 2024 07:41
@BugenZhao BugenZhao changed the base branch from bz/extract-create-table-args-3 to bz/extract-create-table-args-4 December 26, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant