cloud-fan commented on code in PR #57720: URL: https://github.com/apache/spark/pull/57720#discussion_r3704773993
########## sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala: ########## @@ -221,7 +221,35 @@ private case class MySQLDialect() extends JdbcDialect with SQLConfHelper with No // See https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html override def isSyntaxErrorBestEffort(exception: SQLException): Boolean = { - "42000".equals(exception.getSQLState) + "42000".equals(exception.getSQLState) && + !isNonSyntaxErrorBestEffort(exception) Review Comment: `true` must mean this is confidently a syntax error, but the denylist still lets documented non-syntax 42000 errors through. For example, [ER_BAD_DB_ERROR (1049)](https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html#error_er_bad_db_error) is `42000` with message `Unknown database`, so this path returns `true`. Please use an allowlist of vendor codes known to represent syntax errors (including 1064), and add 1049 as a regression case. -- 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]
