-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Feature][Jdbc] Support sink ddl for sqlserver #8114 #8936
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
# Conflicts: # seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-ddl/src/test/java/org/apache/seatunnel/connectors/jdbc/SqlServerSchemaChangeIT.java
This comment was marked as outdated.
This comment was marked as outdated.
davidzollo
left a comment
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.
+1
LGTM
hailin0
left a comment
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 refer to the changes in this PR
|
cc @hawk9821 |
|
Please update docs |
|
OK, thank you, I see. |
|
@hailin0 |
|
waiting for ci passed |
|
Thanks @Aiden-Rose .
|
...he/seatunnel/connectors/seatunnel/jdbc/catalog/sqlserver/SqlServerCreateTableSqlBuilder.java
Outdated
Show resolved
Hide resolved
.../apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/sqlserver/SqlServerDialect.java
Outdated
Show resolved
Hide resolved
| StringBuilder sqlBuilder = | ||
| new StringBuilder("ALTER TABLE ") | ||
| .append(tableIdentifier(tablePath)) | ||
| .append(" ALTER COLUMN ") |
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.
With StringBuilder repeated redundancy above, it is possible to encapsulate a common writing method
| + "AND TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s' AND COLUMN_NAME = '%s';", | ||
| tablePath.getDatabaseName(), | ||
| tablePath.getSchemaName(), | ||
| tablePath.getTableName(), |
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.
sql concatenation as above uses a common approach to reduce redundancy
| if (rs.next()) { | ||
| return rs.getString("IS_NULLABLE").equals("YES"); | ||
| } else { | ||
| throw new SQLException("Column not found: " + column); |
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.
Print detail log
davidzollo
left a comment
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.
+1



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.