kevinjqliu opened a new pull request #3670:
URL: https://github.com/apache/iceberg/pull/3670


   `HiveTableOperations` does not update HMS `transient_lastDdlTime` parameter 
on snapshot write. The param is updated once only on table creation.
   
   For context, we currently query the `transient_lastDdlTime` param directly 
from HMS to determine the freshness of tables. This is faster than reading all 
the metadata files and get the timestamp for each iceberg table's most recent 
snapshot.
   
   This PR removes the 
`transient_lastDdlTime`/`hive_metastoreConstants.DDL_TIME` param when setting 
HMS table parameters in `HiveTableOperations`. By doing so, the [HMS client 
will update the field in its alter table 
function](https://github.com/apache/hive/blob/cceee0a61a75274520178cd31cad26e3b1a25b12/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java#L6081-L6086).
 This is what the [Hive Engine is doing for alter 
table](https://github.com/apache/hive/blob/a8e50734e0460e506f1762fbe0f628bcb444b8f5/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L841-L845).
   
   Alternatively, we can explicitly set the timestamp in `HiveTableOperations` 
instead of relying on HMS client implementation. 
   


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