stevenzwu commented on code in PR #13949:
URL: https://github.com/apache/iceberg/pull/13949#discussion_r2317038609


##########
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/VectorizedArrowReader.java:
##########
@@ -217,6 +217,10 @@ public VectorHolder read(VectorHolder reuse, int 
numValsToRead) {
   }
 
   private void allocateFieldVector(boolean dictionaryEncodedVector) {
+    // Allocate-only: caller must ensure there is no active vector in use.
+    Preconditions.checkState(
+        vec == null,
+        "allocateFieldVector must be called only when no active vector is in 
use (vec == null)");

Review Comment:
   nit: typically error msg is more user friendly and doesn't include method or 
variable names. maybe sth like?
   ```
   Allocation must be called only when previous vector instance was released
   ```



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to