maropu commented on a change in pull request #26230: [SPARK-21287][SQL] Move
the validation of fetch size from JDBCOptions to JdbcDialect
URL: https://github.com/apache/spark/pull/26230#discussion_r338391294
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala
##########
@@ -46,4 +47,14 @@ private case object MySQLDialect extends JdbcDialect {
}
override def isCascadingTruncateTable(): Option[Boolean] = Some(false)
+
+ override def validateFetchSize(size: Int): Unit = {
+ require(size >= 0 || size == Integer.MIN_VALUE,
+ s"Invalid value `${size.toString}` for parameter " +
+ s"`${JDBCOptions.JDBC_BATCH_FETCH_SIZE}` for MySQL. " +
+ s"The value should be >= 0 or equals Integer.MIN_VALUE; " +
Review comment:
nit: you don't need `s` here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]