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


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java:
##########
@@ -143,15 +146,16 @@ public synchronized Map<String, PrincipalSecretsResult> 
bootstrapRealms(
       RealmContext realmContext = () -> realm;
       if (!metaStoreManagerMap.containsKey(realm)) {
         DatasourceOperations datasourceOperations = getDatasourceOperations();
-        try {
-          // Run the set-up script to create the tables.
-          datasourceOperations.executeScript(
-              datasourceOperations
-                  .getDatabaseType()
-                  .openInitScriptResource(bootstrapOptions.schemaOptions()));
-        } catch (SQLException e) {
-          throw new RuntimeException(
-              String.format("Error executing sql script: %s", e.getMessage()), 
e);
+        if (bootstrapOptions.schemaOptions().setupSchema()) {
+          setupSchema(bootstrapOptions.schemaOptions());

Review Comment:
   If we want to support a schemas-per-realm kind of deployment (which is not 
the case today), then we'd need another config property to indicate which kind 
of schema we are using, and when to set it up (at startup vs for each realm).



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