kbendick commented on code in PR #4448:
URL: https://github.com/apache/iceberg/pull/4448#discussion_r863529373


##########
core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java:
##########
@@ -194,7 +194,8 @@ public List<TableIdentifier> listTables(Namespace 
namespace) {
   public void renameTable(TableIdentifier from, TableIdentifier to) {
     int updatedRecords = execute(
         err -> {
-          if (err instanceof SQLIntegrityConstraintViolationException) {
+          if (err instanceof SQLIntegrityConstraintViolationException ||
+              err.getMessage() != null && err.getMessage().contains("UNIQUE 
constraint failed")) {

Review Comment:
   I don't think this test is going to hold up for most JDBC databases.
   
   There's a SQLCode on the error, but it was SQLIte specific in the test runs.



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