@Override
    public BulkWriter<T> create(FSDataOutputStream out) throws IOException {
        OrcFile.WriterOptions opts = getWriterOptions();
        opts.physicalWriter(new PhysicalWriterImpl(out, opts));

        // The path of the Writer is not used to indicate the destination file
        // in this case since we have used a dedicated physical writer to write
        // to the give output stream directly. However, the path would be used as
        // the key of writer in the ORC memory manager, thus we need to make it unique.
        Path unusedPath = new Path(UUID.randomUUID().toString());
        return new OrcBulkWriter<>(vectorizer, new WriterImpl(null, unusedPath, opts));
    }
@Test
    void testNotOverrideInMemoryManager(@TempDir java.nio.file.Path tmpDir) throws IOException {
        TestMemoryManager memoryManager = new TestMemoryManager();
        OrcBulkWriterFactory<Record> factory =
                new TestOrcBulkWriterFactory<>(
                        new RecordVectorizer("struct<_col0:string,_col1:int>"), memoryManager);
        factory.create(new LocalDataOutputStream(tmpDir.resolve("file1").toFile()));
        factory.create(new LocalDataOutputStream(tmpDir.resolve("file2").toFile()));

        List<Path> addedWriterPath = memoryManager.getAddedWriterPath();
        assertThat(addedWriterPath).hasSize(2);
        assertThat(addedWriterPath.get(1)).isNotEqualTo(addedWriterPath.get(0));
    }