yuqi1129 commented on code in PR #11739:
URL: https://github.com/apache/gravitino/pull/11739#discussion_r3664481832


##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/postgresql/EntityChangeLogPostgreSQLProvider.java:
##########
@@ -26,6 +27,13 @@
 
 public class EntityChangeLogPostgreSQLProvider extends 
EntityChangeLogBaseSQLProvider {
 
+  /**
+   * PostgreSQL flavour of the DB-side "now in milliseconds" expression. 
Insertion and expiration
+   * share it, so retention is measured entirely with the database clock.
+   */
+  private static final String CURRENT_TIME_MILLIS_SQL =

Review Comment:
   Good point, done. I moved both flavours into 
`org.apache.gravitino.storage.relational.mapper.provider.DatabaseTimeSQL`, 
which sits in the package shared by the `base`, `h2` and `postgresql` provider 
packages, so any provider can reuse them: `DatabaseTimeSQL.MYSQL` and 
`DatabaseTimeSQL.POSTGRESQL`. The entity change log providers now reference the 
constants.
   
   I did not migrate the other providers in this PR on purpose. The same 
literals are inlined 114 times across 32 files (MySQL flavour) and 107 times 
across 31 files (PostgreSQL flavour), so replacing them all here would bury 
this PR's actual fix under a large mechanical diff. Filed #12236 to do that 
separately.



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