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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to