public static TypeInformation<Row> decorateRowTypeWithNeededHeadFields(
            @Nullable String timeFieldName,
            @Nullable String attributesFieldName,
            RowFormatInfo dataRowFormatInfo) {
        RowTypeInfo rowTypeInfo = (RowTypeInfo) TableFormatForRowUtils.getType(dataRowFormatInfo.getTypeInfo());

        return InLongMsgUtils.decorateRowTypeWithNeededHeadFields(
                timeFieldName,
                attributesFieldName,
                rowTypeInfo);
    }
Creates the type information with given field names and data schema.

@param timeFieldName The name of the time field. Null if the time field is not required.
@param attributesFieldName The name of the attributes field. Null if the attributes field is
                              not required.
@param dataRowFormatInfo The schema of the data fields.
@return The type information
inlong-sort/sort-formats/format-row/format-inlongmsg-base/src/main/java/org/apache/inlong/sort/formats/inlongmsg/row/InLongMsgUtils.java