melin created SPARK-43776:
-----------------------------

             Summary: [BUG] MySQL jdbc cursor has not taken effect
                 Key: SPARK-43776
                 URL: https://issues.apache.org/jira/browse/SPARK-43776
             Project: Spark
          Issue Type: New Feature
          Components: SQL
    Affects Versions: 3.4.1, 3.5.0
            Reporter: melin


JDBCRDD.scala:  stmt.setFetchSize(options.fetchSize)

 
JdbcRDD.scala:
```
if (url.startsWith("jdbc:mysql:")) {
// setFetchSize(Integer.MIN_VALUE) is a mysql driver specific way to force
// streaming results, rather than pulling entire resultset into memory.
// See the below URL
// 
dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-implementation-notes.html

stmt.setFetchSize(Integer.MIN_VALUE)
} else {
stmt.setFetchSize(100)
}
```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to