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


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/DatasourceOperations.java:
##########
@@ -54,15 +55,23 @@ public class DatasourceOperations {
 
   private final DataSource datasource;
   private final RelationalJdbcConfiguration relationalJdbcConfiguration;
+  private final DatabaseType databaseType;
 
   private final Random random = new Random();
 
   public DatasourceOperations(
-      DataSource datasource, RelationalJdbcConfiguration 
relationalJdbcConfiguration) {
+      DataSource datasource,
+      DatabaseType databaseType,

Review Comment:
   I think we don't need to pass the database type, as we can compute it from 
the `datasource`. 



##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java:
##########
@@ -93,7 +93,13 @@ protected PolarisMetaStoreManager 
createNewMetaStoreManager() {
 
   private void initializeForRealm(
       RealmContext realmContext, RootCredentialsSet rootCredentialsSet, 
boolean isBootstrap) {
-    DatasourceOperations databaseOperations = 
getDatasourceOperations(isBootstrap);
+    DatabaseType databaseType;
+    try {
+      databaseType = getDatabaseType();
+    } catch (SQLException e) {
+      throw new RuntimeException(e);
+    }

Review Comment:
   Nit: we could push this into method `getDatasourceOperations()`



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

Reply via email to