rtadepalli commented on code in PR #34424:
URL: https://github.com/apache/arrow/pull/34424#discussion_r1124000741


##########
java/vector/src/main/java/org/apache/arrow/vector/BigIntVector.java:
##########
@@ -71,7 +73,11 @@ public BigIntVector(String name, FieldType fieldType, 
BufferAllocator allocator)
    */
   public BigIntVector(Field field, BufferAllocator allocator) {
     super(field, allocator, TYPE_WIDTH);
-    reader = new BigIntReaderImpl(BigIntVector.this);
+    reader = () -> {

Review Comment:
   This is not thread safe, but I am not sure if adding the Google core 
libraries dependency to get `Suppliers::memoize` is allowed. I don't know of 
other ways to make this thread safe without adding any `throws` clause.
   
   I tried adding `apache.commons.lang3#LazyInitializer` but that I think 
requires that I add `throws ConcurrentException` to the `getReader` function, 
doesn't seem that great.



-- 
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]

Reply via email to