huaxingao commented on code in PR #3584:
URL: https://github.com/apache/polaris/pull/3584#discussion_r2776445061
##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/DatasourceOperations.java:
##########
@@ -83,6 +83,11 @@ DatabaseType getDatabaseType() {
return databaseType;
}
+ /** Returns the detected database type for this datasource. */
+ public DatabaseType databaseType() {
Review Comment:
Removed. Thanks!
##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/models/ModelIdempotencyRecord.java:
##########
@@ -0,0 +1,235 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.polaris.persistence.relational.jdbc.models;
+
+import jakarta.annotation.Nullable;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
+import java.time.Instant;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.polaris.core.entity.IdempotencyRecord;
+import org.apache.polaris.immutables.PolarisImmutable;
+import org.apache.polaris.persistence.relational.jdbc.DatabaseType;
+
+/**
+ * JDBC model for {@link IdempotencyRecord} mirroring the {@code
idempotency_records} table.
+ *
+ * <p>This follows the same pattern as {@link ModelEvent}, separating the
storage representation
+ * from the core domain model while still providing {@link Converter} helpers.
+ */
+@PolarisImmutable
+public interface ModelIdempotencyRecord extends Converter<IdempotencyRecord> {
+
+ String TABLE_NAME = "idempotency_records";
+
+ // Logical tenant / realm identifier.
+ String REALM_ID = "realm_id";
+ // Client-provided idempotency key.
Review Comment:
Added more comments. Thanks!
--
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]