Polber commented on code in PR #30024:
URL: https://github.com/apache/beam/pull/30024#discussion_r1458134155


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcReadSchemaTransformProvider.java:
##########
@@ -164,12 +194,17 @@ public abstract static class 
JdbcReadSchemaTransformConfiguration implements Ser
     public abstract String getDriverJars();
 
     public void validate() throws IllegalArgumentException {
-      if (Strings.isNullOrEmpty(getDriverClassName())) {
-        throw new IllegalArgumentException("JDBC Driver class name cannot be 
blank.");
+      if (Strings.isNullOrEmpty(getDriverClassName()) && 
Strings.isNullOrEmpty(getJdbcType())) {

Review Comment:
   It is not required. One of `driverClassName` or `jdbcType` must be provided. 
If `driverClassName` is not given, then the switch statement you commented on 
above will handle defaulting the driver.



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