diff --git a/extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/DatasourceOperations.java b/extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/DatasourceOperations.java index 64e7b9bd5c..4884dde4ee 100644 --- a/extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/DatasourceOperations.java +++ b/extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/DatasourceOperations.java @@ -77,11 +77,8 @@ public void executeScript(String scriptFilePath) throws SQLException { if (line.endsWith(";")) { // Execute statement when semicolon is found String sql = sqlBuffer.toString().trim(); try { - int rowsUpdated = statement.executeUpdate(sql); - LOGGER.debug("Query {} executed {} rows affected", sql, rowsUpdated); + statement.executeUpdate(sql); } catch (SQLException e) { - LOGGER.error("Error executing query {}", sql, e); - // re:throw this as unhandled exception throw new RuntimeException(e); } sqlBuffer.setLength(0); // Clear the buffer for the next statement @@ -92,11 +89,7 @@ public void executeScript(String scriptFilePath) throws SQLException { connection.setAutoCommit(autoCommit); } } catch (IOException e) { - LOGGER.debug("Error reading the script file", e); throw new RuntimeException(e); - } catch (SQLException e) { - LOGGER.debug("Error executing the script file", e); - throw e; } } @@ -135,7 +128,6 @@ public List executeSelect( } return resultList; } catch (SQLException e) { - LOGGER.debug("Error executing query {}", query, e); throw e; } catch (Exception e) { throw new RuntimeException(e); @@ -156,9 +148,6 @@ public int executeUpdate(String query) throws SQLException { connection.setAutoCommit(true); try { return statement.executeUpdate(query); - } catch (SQLException e) { - LOGGER.debug("Error executing query {}", query, e); - throw e; } finally { connection.setAutoCommit(autoCommit); } @@ -188,9 +177,6 @@ public void runWithinTransaction(TransactionCallback callback) throws SQLExcepti } connection.setAutoCommit(autoCommit); } - } catch (SQLException e) { - LOGGER.debug("Caught Error while executing transaction", e); - throw e; } }