Admaing commented on code in PR #59148: URL: https://github.com/apache/spark/pull/59148#discussion_r4151223437
########## sql/core/src/main/scala/org/apache/spark/sql/jdbc/DB2Dialect.scala: ########## @@ -124,8 +124,10 @@ private case class DB2Dialect() extends JdbcDialect with SQLConfHelper with NoLe override def isCascadingTruncateTable(): Option[Boolean] = Some(false) // See https://www.ibm.com/docs/en/db2-for-zos/12.0.0?topic=codes-sqlstate-values-common-error + // 42601 is DB2's syntax error. Other class 42 states are not syntax errors, e.g. 42704 + // (undefined object) and 42501 (insufficient privilege). override def isSyntaxErrorBestEffort(exception: SQLException): Boolean = { - Option(exception.getSQLState).exists(_.startsWith("42")) + "42601".equals(exception.getSQLState) Review Comment: Done — now accepts the whole 426xx subclass (42601–42604, ...), with 425xx/427xx excluded; unit tests updated. -- 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]
