-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature][Connector-V2] StarRocks-sink support schema evolution #8082
base: dev
Are you sure you want to change the base?
Conversation
…ing with Elasticsearch's automatic index creation apache#7430
…utomatic index creation conflict apache#7430
…utomatically creating indexes based on templates apache#7430
…utomatic index creation conflict apache#7430
…utomatic index creation conflict apache#7430
} | ||
|
||
@TestTemplate | ||
public void testStarRocksSinkWithSchemaEvolutionCase(TestContainer container) |
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.
reference
Line 119 in 69cd4ae
public void testMysqlCdcWithSchemaEvolutionCase(TestContainer container) |
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.
ok, thanks
@@ -40,16 +39,15 @@ | |||
public class StarRocksSink extends AbstractSimpleSink<SeaTunnelRow, Void> | |||
implements SupportSaveMode { |
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.
please Implements SchemaEvolution API
https://github.com/apache/seatunnel/blob/dev/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SupportSchemaEvolutionSink.java
https://github.com/apache/seatunnel/blob/dev/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SupportSchemaEvolutionSinkWriter.java
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.
ok, thanks!
|
||
@Slf4j | ||
public class StarRocksSinkWriter extends AbstractSinkWriter<SeaTunnelRow, Void> { | ||
public class StarRocksSinkWriter extends AbstractSinkWriter<SeaTunnelRow, Void> | ||
implements SupportSchemaEvolutionSinkWriter, SupportSchemaEvolutionSink { |
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.
move SupportSchemaEvolutionSink
to StarRocksSink
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.
ok,thanks,I was negligent
throw new SeaTunnelException( | ||
"Unsupported schemaChangeEvent for event type: " + event.getEventType()); | ||
} | ||
this.tableSchema = |
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.
this.tableSchema = | |
this.tableSchema = TableSchemaChangeEventDispatcher.reset(..).apply(event); |
reference |
ok,I'll try again,thanks |
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.
* @param afterColumn column before the new column | ||
* @return alter table sql for sink table after schema change | ||
*/ | ||
public static String buildAlterTableSql( |
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.
It doesn't need to be so complicated, please simplify the code.
reference
#8134
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.
ok,I optimizing the code,thanks.
Feature #8034
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.