-
Notifications
You must be signed in to change notification settings - Fork 600
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
Automatically apply schema changes on sinks when the parent table changes schema. #16839
Comments
Generally I think this is doable but let's talk about one specific case: not all databases support instant |
We don't have to provide this option for databases where ALTER TABLE is time-consuming. |
Discussed offline, auto schema change can be supported case by case. For example, if the downstream system is slow in ALTER statement, we won't support auto schema evolution on it. Note that for |
For better understanding, this task can be split into 2 parts.
For the 1st point, the challenge is majorly for CDC connectors. Let's discuss it in separated issue. For the 2nd point, as mentioned in Patrick's comment, this work is largely case by case.
For the 3rd point, note that even for
When a new column is added, all the channels and executors in the pipeline need to be aware and change accordingly. This problem is exactly altering MV (no rebuilding) that we have discussed a lot before, but the boundary of the problem can be well-defined and fairly limited. cc. @BugenZhao |
@fuyufjh Do you think it's technically feasible? |
From my understanding, the essential work is similar: changing the definition of the existing actors. But the scope is much more limited. |
See #16834 for the background.
This proposal aims to enable the automatic synchronization of schema changes from source tables to destination tables, such as a StarRocks table, as illustrated below.
When
auto.schema.evolution
is set to true, thesink_users
sink will handle schema change events emitted from theusers
table by executing ALTER ADD COLUMN onsr_users
in StarRocks.Specifically,
ALTER TABLE ADD COLUMN
.When
auto.schema.evolution
is enabled, the downstream table is expected to be fully managed by RW. We need to warn users to be cautious when executing manual schema changes. From this viewpoint, we can also letauto.schema.evolution
auto-create the table (see #15586) if absent, thus offering users a fully-automated ELT experience.It should be noted that the E2E auto schema change is not allowed for
SINK AS SELECT
orSINK FROM <mv>
, given that queries are not able to change schema. It's only available toSINK FROM <table> or <source>
.The text was updated successfully, but these errors were encountered: