yaooqinn commented on code in PR #40588:
URL: https://github.com/apache/spark/pull/40588#discussion_r1156661483
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala:
##########
@@ -215,13 +215,18 @@ private object PostgresDialect extends JdbcDialect with
SQLConfHelper {
case sqlException: SQLException =>
sqlException.getSQLState match {
// https://www.postgresql.org/docs/14/errcodes-appendix.html
- case "42P07" =>
+ case "42P07" if sqlException.getMessage != null =>
Review Comment:
Regexes in match expressions do not accept nulls. It's a defensive action.
In general, there is no such case upstream. And even if it does occur, we will
handle it properly in the default branch.
--
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]