You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/09/30 09:12:52 UTC

[GitHub] [beam] mcGIh opened a new issue, #23441: [Feature Request]: JdbcIO: Allow read fetchSize to be set to Integer.MIN_VALUE

mcGIh opened a new issue, #23441:
URL: https://github.com/apache/beam/issues/23441

   ### What would you like to happen?
   
   MySQL driver allows to stream the Read results when statement's fetchSize is set to Integer.MIN_VALUE.
   
   cf. [documentation](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-implementation-notes.html):
   
   > To enable this functionality, create a Statement instance in the following manner:
   ```java
   stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY,
                 java.sql.ResultSet.CONCUR_READ_ONLY);
   stmt.setFetchSize(Integer.MIN_VALUE);
   ```
   
   JdbcIO class only allows positive fetchSize. This is a blocker if we need to read in a stream mode to avoid OOM errors. 
   ```java
       public T withFetchSize(int fetchSize) {
         checkArgument(fetchSize > 0, "fetch size must be > 0");
         return toBuilder().setFetchSize(fetchSize).build();
       }
   ```
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: io-java-jdbc


-- 
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.apache.org

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


[GitHub] [beam] lukecwik closed issue #23441: [Feature Request]: JdbcIO: Allow read fetchSize to be set to Integer.MIN_VALUE

Posted by GitBox <gi...@apache.org>.
lukecwik closed issue #23441: [Feature Request]: JdbcIO: Allow read fetchSize to be set to Integer.MIN_VALUE
URL: https://github.com/apache/beam/issues/23441


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