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

pgsql ALTER TOPIC command to register new schema #1309

Merged
merged 19 commits into from
Oct 25, 2024

Conversation

akrambek
Copy link
Contributor

Fixes #1058

Copy link
Contributor

@jfallows jfallows left a comment

Choose a reason for hiding this comment

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

Make sure to include negative scenario ITs to detect when ALTER TABLE etc is called with unsupported operation, not add.

Comment on lines 400 to 401
: ALTER opttable_alter_type (IF_P EXISTS)? relation_expr (alter_table_cmds | partition_cmd)
| ALTER opttable_alter_type ALL IN_P TABLESPACE name (OWNED BY role_list)? SET TABLESPACE name opt_nowait
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems they are listing out the possibles explicitly, why not just put ALTER TABLE and ALTER TOPIC here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought since they are logically exactly the same the use like alias

Copy link
Contributor

Choose a reason for hiding this comment

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

Understood, prefer we list them out explicitly if that's okay with you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing!

@@ -36,9 +36,9 @@ public SqlCreateStreamListener(
this.tokens = tokens;
}

public StreamInfo streamInfo()
public Stream streamInfo()
Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to have a suffix for these model class names, consider Model instead of Info.
Alternatively consider a prefix like PgsqlStream.

Copy link
Contributor Author

@akrambek akrambek Oct 24, 2024

Choose a reason for hiding this comment

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

I actually removed suffixes from all other places this got missed

"${app}/alter.topic.unsupported.operation/client",
"${app}/alter.topic.unsupported.operation/server"
})
public void shouldNotAlterTopicColumn() throws Exception
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
public void shouldNotAlterTopicColumn() throws Exception
public void shouldNotAlterTopicModifyColumn() throws Exception

?

Comment on lines 61 to 62
"${app}/alter.topic.unsupported.operation/client",
"${app}/alter.topic.unsupported.operation/server"
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
"${app}/alter.topic.unsupported.operation/client",
"${app}/alter.topic.unsupported.operation/server"
"${app}/alter.topic.modify.column.rejected/client",
"${app}/alter.topic.modify.column.rejected/server"

Comment on lines 102 to 103
throw new UnsupportedOperationException(
String.format("Unsupported alter operation: %s", alterExpr.operation()));
Copy link
Contributor

Choose a reason for hiding this comment

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

This is using exceptions for flow control, which we typically avoid because it is heavy.

Comment on lines 75 to 77
"${pgsql}/alter.topic.unsupported.operation/client"
})
public void shouldNotAlterTopicColumn() throws Exception
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
"${pgsql}/alter.topic.unsupported.operation/client"
})
public void shouldNotAlterTopicColumn() throws Exception
"${pgsql}/alter.topic.modify.column.rejected/client"
})
public void shouldNotAlterTopicModifyColumn() throws Exception

jfallows
jfallows previously approved these changes Oct 25, 2024
@jfallows jfallows merged commit 818bdf6 into aklivity:develop Oct 25, 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.

Support pgsql-kafka binding
2 participants