-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Feature][Transform] Support define sink column type #9114
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
Conversation
4a7ab15 to
a08a605
Compare
a08a605 to
dfad0e1
Compare
225ec7b to
ea5708a
Compare
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.
Copilot reviewed 45 out of 45 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/iris/IrisCreateTableSqlBuilder.java:113
- Consider using a check that also validates for blank values (e.g. StringUtils.isNotBlank(column.getSinkType())) instead of only a null check to avoid unintended behavior when an empty string is provided.
if (column.getSinkType() != null) {
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/mysql/MysqlCreateTableSqlBuilder.java:182
- [nitpick] Consider specifying an explicit access modifier (e.g. private) for the buildColumnIdentifySql method to ensure consistency and clarity with similar methods in other catalog builder classes.
String buildColumnIdentifySql(
|
PTAL |
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.
Copilot reviewed 45 out of 45 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (3)
seatunnel-connectors-v2/connector-jdbc/catalog/sqlserver/SqlServerCreateTableSqlBuilder.java:199
- [nitpick] Consider using a check for a non-blank sink type (e.g., StringUtils.isNotBlank(column.getSinkType())) instead of only a null check to avoid using empty strings as column types.
if (column.getSinkType() != null) {
seatunnel-connectors-v2/connector-jdbc/catalog/psql/PostgresCreateTableSqlBuilder.java:127
- The access modifier for buildColumnSql was changed from private to package-private; if this change is not intentional, consider reverting to private to preserve encapsulation.
String buildColumnSql(Column column) {
seatunnel-connectors-v2/connector-clickhouse/util/ClickhouseCatalogUtil.java:35
- [nitpick] Consider validating that column.getSinkType() is not only non-null but also non-empty to prevent empty string values from being used as the column type.
if (column.getSinkType() != null) {
| import static org.junit.jupiter.api.Assertions.assertEquals; | ||
| import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
|
||
| public class DefineSinkTypeTransformTest { |
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.
Test with multi-table?
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.
@Hisoka-X fixed
ea5708a to
e891ecf
Compare
e891ecf to
155dd67
Compare
Purpose of this pull request
[Transform] Support define sink column type
Does this PR introduce any user-facing change?
add new transform
How was this patch tested?
Check list
New License Guide
release-note.