shunping commented on code in PR #36339:
URL: https://github.com/apache/beam/pull/36339#discussion_r2395708481


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/providers/ReadFromPostgresSchemaTransformProvider.java:
##########
@@ -59,14 +59,18 @@ protected String jdbcType() {
       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));
+      LOG.warn(
+          "Wrong JDBC type. Expected '{}' but got '{}'. Overriding with '{}'.",
+          jdbcType(),
+          jdbcType,
+          jdbcType());
+      configuration = 
configuration.toBuilder().setJdbcType(jdbcType()).build();

Review Comment:
   https://github.com/apache/beam/pull/36045#discussion_r2337753445
   
   We are not going to surface this parameter in the config for end users.



-- 
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]

Reply via email to