public static void validateFieldNames(
            String timeFieldName,
            String attributesFieldName,
            RowFormatInfo rowFormatInfo) {
        if (Objects.equals(timeFieldName, attributesFieldName)) {
            throw new ValidationException("The names of the time and attributes fields are same.");
        }

        String[] dataFieldNames = rowFormatInfo.getFieldNames();
        for (String dataFieldName : dataFieldNames) {
            if (dataFieldName.equals(timeFieldName)) {
                throw new ValidationException("The time field " + timeFieldName + " is already defined in the schema.");
            }

            if (dataFieldName.equals(attributesFieldName)) {
                throw new ValidationException("The attributes field "
                        + attributesFieldName + " is already defined in the schema.");
            }
        }
    }
Validates that the names of the time and attributes field do no conflict
with the names of data fields.
inlong-sort/sort-formats/format-row/format-inlongmsg-base/src/main/java/org/apache/inlong/sort/formats/inlongmsg/row/InLongMsgUtils.java