You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "zhuangchong (via GitHub)" <gi...@apache.org> on 2023/11/21 12:56:32 UTC

[PR] [core] fix after compactioned the array elements are duplicated [incubator-paimon]

zhuangchong opened a new pull request, #2364:
URL: https://github.com/apache/incubator-paimon/pull/2364

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Linked issue: close #2353 
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] fix after compactioned the array elements are duplicated [incubator-paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #2364:
URL: https://github.com/apache/incubator-paimon/pull/2364#discussion_r1400756568


##########
paimon-format/src/main/java/org/apache/paimon/format/orc/reader/OrcRowColumnVector.java:
##########
@@ -43,7 +43,8 @@ public OrcRowColumnVector(StructColumnVector hiveVector, RowType type) {
 
     @Override
     public ColumnarRow getRow(int i) {
-        this.columnarRow.setRowId(i);
-        return this.columnarRow;
+        ColumnarRow copy = this.columnarRow.copy();

Review Comment:
   Don't need to introduce this `copy`, just:
   ```
       private final VectorizedColumnBatch batch;
   
       public OrcRowColumnVector(StructColumnVector hiveVector, RowType type) {
           super(hiveVector);
           int len = hiveVector.fields.length;
           ColumnVector[] paimonVectors = new ColumnVector[len];
           for (int i = 0; i < len; i++) {
               paimonVectors[i] = createPaimonVector(hiveVector.fields[i], type.getTypeAt(i));
           }
           this.batch = new VectorizedColumnBatch(paimonVectors);
       }
   
       @Override
       public ColumnarRow getRow(int i) {
           return new ColumnarRow(batch, i);
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] fix after compactioned the array elements are duplicated [incubator-paimon]

Posted by "zhuangchong (via GitHub)" <gi...@apache.org>.
zhuangchong commented on code in PR #2364:
URL: https://github.com/apache/incubator-paimon/pull/2364#discussion_r1401382154


##########
paimon-format/src/main/java/org/apache/paimon/format/orc/reader/OrcRowColumnVector.java:
##########
@@ -43,7 +43,8 @@ public OrcRowColumnVector(StructColumnVector hiveVector, RowType type) {
 
     @Override
     public ColumnarRow getRow(int i) {
-        this.columnarRow.setRowId(i);
-        return this.columnarRow;
+        ColumnarRow copy = this.columnarRow.copy();

Review Comment:
   Thanks @JingsongLi .



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] fix after compactioned the array elements are duplicated [incubator-paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #2364:
URL: https://github.com/apache/incubator-paimon/pull/2364


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org