diff --git a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java index f3ed475e59c9..74ad7f48e225 100644 --- a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java +++ b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalog.java @@ -92,6 +92,7 @@ import static org.apache.hadoop.hive.conf.HiveConf.ConfVars.METASTOREWAREHOUSE; import static org.apache.hadoop.hive.serde.serdeConstants.FIELD_DELIM; import static org.apache.paimon.CoreOptions.FILE_FORMAT; +import static org.apache.paimon.CoreOptions.PARTITION_EXPIRATION_TIME; import static org.apache.paimon.CoreOptions.TYPE; import static org.apache.paimon.TableType.FORMAT_TABLE; import static org.apache.paimon.hive.HiveCatalogLock.acquireTimeout; @@ -721,6 +722,13 @@ private Table createHiveTable(Identifier identifier, TableSchema tableSchema, Pa tblProperties.putAll(convertToPropertiesTableKey(tableSchema)); } else { tblProperties = convertToPropertiesPrefixKey(tableSchema.options(), HIVE_PREFIX); + if (tableSchema.options().containsKey(PARTITION_EXPIRATION_TIME.key())) { + // This property will be stored in the 'table_params' table of the HMS database for + // querying by other engines or products. + tblProperties.put( + PARTITION_EXPIRATION_TIME.key(), + tableSchema.options().get(PARTITION_EXPIRATION_TIME.key())); + } } Table table = newHmsTable(identifier, tblProperties, provider);