nandorKollar commented on code in PR #13935:
URL: https://github.com/apache/iceberg/pull/13935#discussion_r2304814989


##########
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/VectorizedArrowReader.java:
##########
@@ -249,6 +249,9 @@ private static Types.NestedField getPhysicalType(
   }
 
   private void allocateDictEncodedVector() {
+    if (vec != null) {

Review Comment:
   Why not close the vector once in `private void allocateFieldVector(boolean 
dictionaryEncodedVector)` method, at the very beginning, instead of closing it 
in each private allocator method? Eventually 
   ```
   if (vec != null) {
         vec.close();
   }
   ```
   check is needed for each branch in `allocateFieldVector` method.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to