srielau commented on code in PR #39498:
URL: https://github.com/apache/spark/pull/39498#discussion_r1070635016


##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala:
##########
@@ -224,7 +224,11 @@ private object PostgresDialect extends JdbcDialect with 
SQLConfHelper {
         sqlException.getSQLState match {
           // https://www.postgresql.org/docs/14/errcodes-appendix.html
           case "42P07" => throw new IndexAlreadyExistsException(message, cause 
= Some(e))
-          case "42704" => throw new NoSuchIndexException(message, cause = 
Some(e))
+          case "42704" =>
+            // The message is: Failed to drop index indexName in tableName
+            val regex = "(?s)Failed to drop index (.*) in".r

Review Comment:
   Seems we may be able to pick up the qualifiers as well ?



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