eric-maynard commented on code in PR #1942: URL: https://github.com/apache/polaris/pull/1942#discussion_r2175813360
########## persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/DatasourceOperations.java: ########## @@ -80,16 +81,13 @@ DatabaseType getDatabaseType() { * @param scriptFilePath : Path of SQL script. * @throws SQLException : Exception while executing the script. */ - public void executeScript(String scriptFilePath) throws SQLException { - ClassLoader classLoader = DatasourceOperations.class.getClassLoader(); + public void executeScript(InputStream scriptInputStream) throws SQLException { runWithinTransaction( connection -> { try (Statement statement = connection.createStatement()) { BufferedReader reader = new BufferedReader( - new InputStreamReader( - Objects.requireNonNull(classLoader.getResourceAsStream(scriptFilePath)), - UTF_8)); + new InputStreamReader(Objects.requireNonNull(scriptInputStream), UTF_8)); Review Comment: That sounds like a good idea... is this [the one from jsr305](https://www.javadoc.io/static/com.google.code.findbugs/jsr305/3.0.2/javax/annotation/WillClose.html)? It doesn't seem that we have that dependency currently, and we're not using it anywhere else in the project. -- 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: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org