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_r201199910
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
##########
@@ -376,9 +376,8 @@ public void updateStats(FragmentWritableBatch
writableBatch) {
*/
public void initializeBatch() {
for (VectorWrapper<?> v : incoming) {
- // create new vector
- @SuppressWarnings("resource")
- ValueVector outgoingVector = TypeHelper.getNewVector(v.getField(),
allocator);
+ // create new vector by cloning the incoming vector's type
+ ValueVector outgoingVector = TypeHelper.getClonedVector(v.getField(),
allocator);
Review comment:
This is the heart of the change: this is the place where we were reusing
previously-owned materialized fields.
----------------------------------------------------------------
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