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


##########
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:
   I mean default in bootstrap code to whatever version happens to be latest 
when no explicit version is requested, but avoid having the `LATEST` constant.



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