beliefer commented on code in PR #40359:
URL: https://github.com/apache/spark/pull/40359#discussion_r1133011143
##########
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:
if limit = 0, Optimizer will convert it to empty relation. But it's OK to
use `limit < 0`.
--
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]