public static Object getDefaultPartitionValue(Map<String, Object> rawData, RowType schema,
            PartitionPolicy partitionPolicy, String partitionField, String timestampPattern) {
        if (PartitionPolicy.NONE == partitionPolicy) {
            return null;
        }

        if (PartitionPolicy.PROC_TIME == partitionPolicy) {
            return DateTimeFormatter.ofPattern(timestampPattern).format(LocalDateTime.now());
        }

        String defaultPartitionFieldName = DEFAULT_PARTITION_DATE_FIELD;
        if (PartitionPolicy.ASSIGN_FIELD == partitionPolicy) {
            defaultPartitionFieldName = partitionField;
        }
        Pattern pattern = Pattern.compile(Pattern.quote(defaultPartitionFieldName), Pattern.CASE_INSENSITIVE);
        for (RowField field : schema.getFields()) {
            LogicalTypeRoot type = field.getType().getTypeRoot();
            if (type == TIMESTAMP_WITH_LOCAL_TIME_ZONE || type == TIMESTAMP_WITH_TIME_ZONE
                    || type == TIMESTAMP_WITHOUT_TIME_ZONE || type == DATE) {
                if (pattern.matcher(field.getName()).matches()) {
                    String value = (String) rawData.get(field.getName());
                    return formatDate(value, timestampPattern);
                }
            }
        }
        if (PartitionPolicy.SOURCE_DATE_FIELD == partitionPolicy) {
            // no create or update time field, return proc time
            return DateTimeFormatter.ofPattern(timestampPattern).format(LocalDateTime.now());
        }
        return null;
    }
if raw data has field like create_date or create_time, give it to default partition field.
or give first timestamp or date type field value to default partition field

@param rawData row data
@param schema flink field types
@param partitionPolicy partition policy
@param partitionField partition field
@param timestampPattern timestamp pattern
@return default partition value
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/hive/src/main/java/org/apache/inlong/sort/hive/util/HiveTableUtil.java