cloud-fan commented on code in PR #40359:
URL: https://github.com/apache/spark/pull/40359#discussion_r1132448651
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala:
##########
@@ -291,4 +291,26 @@ private case object MySQLDialect extends JdbcDialect with
SQLConfHelper {
throw QueryExecutionErrors.unsupportedDropNamespaceRestrictError()
}
}
+
+ class MySQLSQLQueryBuilder(dialect: JdbcDialect, options: JDBCOptions)
+ extends JdbcSQLQueryBuilder(dialect, options) {
+
+ override def build(): String = {
+ if (limit < 1 && offset > 0) {
Review Comment:
is it possible to have limit = 0? seems safer to use `limit < 0` to indicate
no limit.
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala:
##########
@@ -291,4 +291,26 @@ private case object MySQLDialect extends JdbcDialect with
SQLConfHelper {
throw QueryExecutionErrors.unsupportedDropNamespaceRestrictError()
}
}
+
+ class MySQLSQLQueryBuilder(dialect: JdbcDialect, options: JDBCOptions)
+ extends JdbcSQLQueryBuilder(dialect, options) {
+
+ override def build(): String = {
+ if (limit < 1 && offset > 0) {
Review Comment:
is it possible to have limit = 0? seems safer to use `limit < 0` to indicate
no limit, as the default value is -1
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]