-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support ALTER STREAM and ALTER TABLE transformation #1320
Conversation
public RisingwaveAlterTopicTemplate() | ||
{ | ||
} | ||
|
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.
No need for explicit no-args constructor when no other constructors are present, this is implicitly already there.
Same applies to other classes.
| ALTER opt_column colid opt_set_data TYPE_P typename opt_collate_clause alter_using | ||
| ALTER opt_column colid alter_generic_options |
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.
Let's put all the ALTER
s together.
ObjectNode parentNode = mapper.createObjectNode(); | ||
parentNode.put("schemaType", "AVRO"); | ||
parentNode.put("schema", schema.toString()); | ||
|
||
newSchemaJson = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(parentNode); |
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 use jsonb
and eliminate jackson
dependency.
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.15.2</version> | ||
<dependency> |
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.
<dependency> | |
<dependency> |
if (isNullable) | ||
{ | ||
return new AvroField(columnName, new Object[]{"null", avroType}); | ||
} | ||
else | ||
{ | ||
return new AvroField(columnName, avroType); | ||
} |
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.
if (isNullable) | |
{ | |
return new AvroField(columnName, new Object[]{"null", avroType}); | |
} | |
else | |
{ | |
return new AvroField(columnName, avroType); | |
} | |
return isNullable | |
? new AvroField(columnName, new Object[]{"null", avroType}) | |
: new AvroField(columnName, avroType); |
Description
Support ALTER STREAM and ALTER TABLE transformation