yuchuanchen commented on code in PR #20616:
URL: https://github.com/apache/flink/pull/20616#discussion_r952082659


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/columnar/vector/heap/HeapRowVector.java:
##########
@@ -46,4 +46,12 @@ public ColumnarRowData getRow(int i) {
         columnarRowData.setRowId(i);
         return columnarRowData;
     }
+
+    @Override
+    public void reset() {

Review Comment:
   There is no need to Override `HeapArrayVector` and `HeapMapVector`.
   
    In `ArrayColumnReader.fillColumnVector()`, the child of `HeapArrayVector` 
is always reset by  calling `setChild()`
   
![image](https://user-images.githubusercontent.com/9213476/186051604-bebd62cd-a0aa-448f-8484-b7aa181f8b62.png)
   
   `MapColumnReader` actually readToVector by creating 2 new ArrayColumnReader 
for each `readBatch()`.
   
![image](https://user-images.githubusercontent.com/9213476/186050844-1e3644e8-2817-4f9a-88c8-08e5a6005963.png)
   
   That's why Map and Array types do not occur this problem.
   



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to