beliefer commented on code in PR #40359:
URL: https://github.com/apache/spark/pull/40359#discussion_r1132157169


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala:
##########
@@ -291,4 +291,22 @@ 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) {
+        val offsetClause = dialect.getOffsetClause(offset)
+        options.prepareQuery +
+          s"SELECT $columnList FROM ${options.tableOrQuery} 
$tableSampleClause" +
+          s" $whereClause $groupByClause $orderByClause LIMIT 
18446744073709551610 $offsetClause"

Review Comment:
   MySQL doesn't support offset without limit.



-- 
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]

Reply via email to