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


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/models/ModelEntity.java:
##########
@@ -176,6 +202,14 @@ public static Builder builder() {
 
   @Override
   public PolarisBaseEntity fromResultSet(ResultSet r) throws SQLException {
+    // location_without_scheme column was added in schema version 2
+    String locationWithoutScheme = null;
+    try {
+      locationWithoutScheme = r.getString("location_without_scheme");
+    } catch (SQLException e) {
+      // Column does not exist, handle gracefully
+    }

Review Comment:
   I think this part of logic would be simpler if we allow the object to have a 
new filed for schema version.
   ```
   if (schemaVersion >= 2) {
        locationWithoutScheme = r.getString("location_without_scheme");
   }
   ```



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