paul-rogers commented on a change in pull request #1367: DRILL-6585:
PartitionSender clones vectors, but shares field metdata
URL: https://github.com/apache/drill/pull/1367#discussion_r201170409
##########
File path: exec/vector/src/main/codegen/templates/BasicTypeHelper.java
##########
@@ -233,10 +227,54 @@ public static ValueVector getNewVector(String name,
BufferAllocator allocator, M
throw new UnsupportedOperationException(buildErrorMessage("get holder
reader implementation", type, mode));
}
- public static ValueVector getNewVector(MaterializedField field,
BufferAllocator allocator){
+ public static ValueVector getNewVector(String name, BufferAllocator
allocator, MajorType type, CallBack callBack) {
+ MaterializedField field = MaterializedField.create(name, type);
+ return getNewVector(field, allocator, callBack);
+ }
+
+ public static ValueVector getNewVector(MaterializedField field,
BufferAllocator allocator) {
Review comment:
No sharing should ever occur. Vectors under construction are not sharable;
only completed, finalized vectors are shareable. (None of the vector builder
methods are synchronized. Not sure what it even means for two threads to write
to the same vector as they must coordinate on rows, and thread T1 can't write
its VARCHAR to row 2 until thread T2 writes its value to row 1.)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services