public static TypeInformation<Row> buildRowType(
            String timeFieldName,
            String attributesFieldName,
            RowFormatInfo rowFormatInfo) {
        String[] dataFieldNames = rowFormatInfo.getFieldNames();
        String[] fieldNames = new String[dataFieldNames.length + 2];
        fieldNames[0] = timeFieldName;
        fieldNames[1] = attributesFieldName;
        System.arraycopy(dataFieldNames, 0, fieldNames, 2, dataFieldNames.length);

        FormatInfo[] dataFieldFormatInfos = rowFormatInfo.getFieldFormatInfos();
        TypeInformation<?>[] fieldTypes =
                new TypeInformation<?>[dataFieldFormatInfos.length + 2];
        fieldTypes[0] = Types.SQL_TIMESTAMP;
        fieldTypes[1] = Types.MAP(Types.STRING, Types.STRING);

        for (int i = 0; i < dataFieldFormatInfos.length; ++i) {
            fieldTypes[i + 2] = TableFormatForRowUtils.getType(dataFieldFormatInfos[i].getTypeInfo());
        }

        return Types.ROW_NAMED(fieldNames, fieldTypes);
    }
Creates the type information with given field names and data schema.

@param timeFieldName The name of the time field.
@param attributesFieldName The name of the attributes field.
@param rowFormatInfo The schema of 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