adutra commented on code in PR #1802:
URL: https://github.com/apache/polaris/pull/1802#discussion_r2129157281


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/DatasourceOperations.java:
##########
@@ -206,6 +215,17 @@ public void runWithinTransaction(TransactionCallback 
callback) throws SQLExcepti
         });
   }
 
+  public Integer execute(Connection connection, QueryGenerator.PreparedQuery 
preparedQuery)
+      throws SQLException {
+    try (PreparedStatement statement = 
connection.prepareStatement(preparedQuery.sql())) {

Review Comment:
   I agree that in general prepared statements should be created at application 
startup, and stored for later retrieval. That being said, I believe the 
Postgres JDBC driver has an internal prepared statements cache, so this 
wouldn't generate a `PREPARE` instruction each time it's executed.



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

Reply via email to