huaxingao commented on code in PR #3584: URL: https://github.com/apache/polaris/pull/3584#discussion_r2776444635
########## 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 Review Comment: I removed `@PolarisImmutable` as suggested. That required a small follow-up refactor in `RelationalJdbcIdempotencyStore.reserve()`: we no longer build an `ImmutableModelIdempotencyRecord` just to get the insert bindings; instead we construct the insert map/values directly (same columns/values, still uses `QueryGenerator.generateInsertQuery`). This keeps behavior the same while avoiding the Immutables-generated type. -- 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]
