zratkai commented on code in PR #5186:
URL: https://github.com/apache/hive/pull/5186#discussion_r1565469449


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -705,12 +706,11 @@ public LockResponse lockMaterializationRebuild(String 
dbName, String tableName,
   public boolean heartbeatLockMaterializationRebuild(String dbName, String 
tableName, long txnId) throws MetaException {
     int result = jdbcResource.execute(
         "UPDATE \"MATERIALIZATION_REBUILD_LOCKS\"" +
-            " SET \"MRL_LAST_HEARTBEAT\" = " + Instant.now().toEpochMilli() +
-            " WHERE \"MRL_TXN_ID\" = " + txnId +
-            " AND \"MRL_DB_NAME\" = ?" +
-            " AND \"MRL_TBL_NAME\" = ?",
+            " SET \"MRL_LAST_HEARTBEAT\" = " + 
getEpochFn(jdbcResource.getDatabaseProduct()) +

Review Comment:
   Instead of concatenating the timestamp, I would prefer to use it as 
parametrised value like txnId, dbName.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to