This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 226e78161 [orc] Remove writer in Vectorizer
226e78161 is described below

commit 226e781610e242a2a204854d7b0c464a94caa24c
Author: Jingsong <[email protected]>
AuthorDate: Wed Apr 10 18:15:58 2024 +0800

    [orc] Remove writer in Vectorizer
---
 .../org/apache/paimon/format/orc/writer/OrcBulkWriter.java  |  3 ---
 .../org/apache/paimon/format/orc/writer/Vectorizer.java     | 13 -------------
 2 files changed, 16 deletions(-)

diff --git 
a/paimon-format/src/main/java/org/apache/paimon/format/orc/writer/OrcBulkWriter.java
 
b/paimon-format/src/main/java/org/apache/paimon/format/orc/writer/OrcBulkWriter.java
index 478751fa1..4bb1223dc 100644
--- 
a/paimon-format/src/main/java/org/apache/paimon/format/orc/writer/OrcBulkWriter.java
+++ 
b/paimon-format/src/main/java/org/apache/paimon/format/orc/writer/OrcBulkWriter.java
@@ -47,9 +47,6 @@ public class OrcBulkWriter implements FormatWriter {
         this.writer = checkNotNull(writer);
 
         this.rowBatch = vectorizer.getSchema().createRowBatch(batchSize);
-        // Configure the vectorizer with the writer so that users can add
-        // metadata on the fly through the Vectorizer#vectorize(...) method.
-        this.vectorizer.setWriter(this.writer);
         this.underlyingStream = underlyingStream;
     }
 
diff --git 
a/paimon-format/src/main/java/org/apache/paimon/format/orc/writer/Vectorizer.java
 
b/paimon-format/src/main/java/org/apache/paimon/format/orc/writer/Vectorizer.java
index f1341b0b8..0f0e6bba7 100644
--- 
a/paimon-format/src/main/java/org/apache/paimon/format/orc/writer/Vectorizer.java
+++ 
b/paimon-format/src/main/java/org/apache/paimon/format/orc/writer/Vectorizer.java
@@ -20,7 +20,6 @@ package org.apache.paimon.format.orc.writer;
 
 import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.orc.TypeDescription;
-import org.apache.orc.Writer;
 
 import java.io.IOException;
 import java.io.Serializable;
@@ -40,8 +39,6 @@ public abstract class Vectorizer<T> implements Serializable {
 
     private final TypeDescription schema;
 
-    private transient Writer writer;
-
     public Vectorizer(final String schema) {
         checkNotNull(schema);
         this.schema = TypeDescription.fromString(schema);
@@ -56,16 +53,6 @@ public abstract class Vectorizer<T> implements Serializable {
         return this.schema;
     }
 
-    /**
-     * Users are not supposed to use this method since this is intended to be 
used only by the
-     * {@link OrcBulkWriter}.
-     *
-     * @param writer the underlying ORC Writer.
-     */
-    public void setWriter(Writer writer) {
-        this.writer = writer;
-    }
-
     /**
      * Transforms the provided element to ColumnVectors and sets them in the 
exposed
      * VectorizedRowBatch.

Reply via email to