urosstan-db commented on code in PR #53456: URL: https://github.com/apache/spark/pull/53456#discussion_r2614011390
########## sql/core/src/main/scala/org/apache/spark/sql/jdbc/TeradataDialect.scala: ########## @@ -56,8 +56,8 @@ private case class TeradataDialect() extends JdbcDialect with NoLegacyJDBCError // scalastyle:off line.size.limit // See https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/SQL-Stored-Procedures-and-Embedded-SQL/SQLSTATE-Mappings/SQLSTATE-Codes // scalastyle:on line.size.limit - override def isSyntaxErrorBestEffort(exception: SQLException): Boolean = { - Option(exception.getSQLState).exists(_.startsWith("42")) + override def isSyntaxErrorBestEffort(exception: SQLException): Option[Boolean] = { + Some(Option(exception.getSQLState).exists(_.startsWith("42"))) Review Comment: We can simplify this expression ```suggestion Option(exception.getSQLState).map(_.startsWith("42")) ``` -- 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]
