shunping commented on code in PR #36045:
URL: https://github.com/apache/beam/pull/36045#discussion_r2356023141
##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromMySqlSchemaTransformProvider.java:
##########
@@ -43,4 +51,31 @@ public String description() {
protected String jdbcType() {
return MYSQL;
}
+
+ @Override
+ public @UnknownKeyFor @NonNull @Initialized SchemaTransform from(
+ JdbcReadSchemaTransformConfiguration configuration) {
+ String jdbcType = configuration.getJdbcType();
+ if (jdbcType != null && !jdbcType.isEmpty() &&
!jdbcType.equals(jdbcType())) {
+ throw new IllegalArgumentException(
+ String.format("Wrong JDBC type. Expected '%s' but got '%s'",
jdbcType(), jdbcType));
+ }
Review Comment:
I have changed the exception to a warning message and overwritten the wrong
type with the correct one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]