You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "aromanenko-dev (via GitHub)" <gi...@apache.org> on 2023/01/23 17:54:43 UTC

[GitHub] [beam] aromanenko-dev commented on a diff in pull request #25062: Set maxConnections optional in incoming schema for JdbcSchemaIOProvider

aromanenko-dev commented on code in PR #25062:
URL: https://github.com/apache/beam/pull/25062#discussion_r1084370602


##########
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcSchemaIOProvider.java:
##########
@@ -175,9 +175,11 @@ protected JdbcIO.DataSourceConfiguration getDataSourceConfiguration() {
         dataSourceConfiguration = dataSourceConfiguration.withConnectionInitSqls(initSqls);
       }
 
-      @Nullable Integer maxConnections = config.getInt32("maxConnections");
-      if (maxConnections != null) {
-        dataSourceConfiguration = dataSourceConfiguration.withMaxConnections(maxConnections);
+      if (config.getSchema().hasField("maxConnections")) {

Review Comment:
   Thanks for fixing this!
   nit: I think `maxConnections ` should be added as a Schema field to builder at `configurationSchema()` 



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org