private HiveWriterFactory getHiveWriterFactory(ObjectIdentifier identifier, RowType schema, String hiveVersion) {
        HiveWriterFactory writerFactory = HiveTableUtil.getWriterFactory(hiveShim, hiveVersion, identifier);
        if (writerFactory == null) {
            // hive table may not exist, auto create
            HiveTableUtil.createTable(identifier.getDatabaseName(), identifier.getObjectName(), schema, partitionPolicy,
                    hiveVersion, inputFormat, outputFormat, serializationLib);
            writerFactory = HiveTableUtil.getWriterFactory(hiveShim, hiveVersion, identifier);
        }
        return writerFactory;
    }
get hive writer factory, create table if not exists automatically

@param identifier hive database and table name
@param schema hive field with flink type
@return hive writer factory
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/hive/src/main/java/org/apache/inlong/sort/hive/filesystem/HadoopPathBasedPartFileWriter.java