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

Support ALTER STREAM and ALTER TABLE transformation #1320

Merged
merged 12 commits into from
Nov 8, 2024

Conversation

akrambek
Copy link
Contributor

@akrambek akrambek commented Nov 5, 2024

Description

Support ALTER STREAM and ALTER TABLE transformation

Comment on lines 25 to 28
public RisingwaveAlterTopicTemplate()
{
}

Copy link
Contributor

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.

Comment on lines +439 to +440
| ALTER opt_column colid opt_set_data TYPE_P typename opt_collate_clause alter_using
| ALTER opt_column colid alter_generic_options
Copy link
Contributor

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 ALTERs together.

Comment on lines 98 to 102
ObjectNode parentNode = mapper.createObjectNode();
parentNode.put("schemaType", "AVRO");
parentNode.put("schema", schema.toString());

newSchemaJson = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(parentNode);
Copy link
Contributor

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<dependency>
<dependency>

Comment on lines 56 to 63
if (isNullable)
{
return new AvroField(columnName, new Object[]{"null", avroType});
}
else
{
return new AvroField(columnName, avroType);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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);

@jfallows jfallows merged commit af27e62 into aklivity:develop Nov 8, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants