private static boolean validateExpirationField(
      Types.NestedField field, String name, String expirationField) {
    if (StringUtils.isBlank(expirationField) || null == field) {
      LOG.warn(
          String.format(
              "Field(%s) used to determine data expiration is illegal for table(%s)",
              expirationField, name));
      return false;
    }
    Type.TypeID typeID = field.type().typeId();
    if (!DATA_EXPIRATION_FIELD_TYPES.contains(typeID)) {
      LOG.warn(
          String.format(
              "Table(%s) field(%s) type(%s) is not supported for data expiration, please use the "
                  + "following types: %s",
              name,
              expirationField,
              typeID.name(),
              StringUtils.join(DATA_EXPIRATION_FIELD_TYPES, ", ")));
      return false;
    }

    return true;
  }
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