public static boolean isValidDataExpirationField(
      DataExpirationConfig config, Types.NestedField field, String name) {
    return config.isEnabled()
        && config.getRetentionTime() > 0
        && validateExpirationField(field, name, config.getExpirationField());
  }
Check if the given field is valid for data expiration.

@param config data expiration config
@param field table nested field
@param name table name
@return true if field is valid
amoro-ams/src/main/java/org/apache/amoro/server/table/TableConfigurations.java