dimas-b commented on code in PR #1942:
URL: https://github.com/apache/polaris/pull/1942#discussion_r2167842409


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/DatabaseType.java:
##########
@@ -43,7 +45,21 @@ public static DatabaseType fromDisplayName(String 
displayName) {
     };
   }
 
-  public String getInitScriptResource() {
-    return String.format("%s/schema-v1.sql", this.getDisplayName());
+  public String getInitScriptResource(@Nonnull SchemaOptions schemaOptions) {
+    final String schemaFile;
+    if (schemaOptions.schemaFile() != null) {
+      schemaFile = schemaOptions.schemaFile();
+    } else {
+      String schemaSuffix;
+      switch (schemaOptions.schemaVersion()) {
+        case SchemaOptions.LATEST -> schemaSuffix = "schema-v1.sql";

Review Comment:
   Null works too :)



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