You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/07/14 01:01:35 UTC

[GitHub] paul-rogers closed pull request #1367: DRILL-6585: PartitionSender clones vectors, but shares field metdata

paul-rogers closed pull request #1367: DRILL-6585: PartitionSender clones vectors, but shares field metdata
URL: https://github.com/apache/drill/pull/1367
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
index 0d52b53efd0..64aabfa5cd3 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
+++ b/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.getNewVector(v.getField().cloneEmpty(), allocator);
         outgoingVector.setInitialCapacity(outgoingRecordBatchSize);
         vectorContainer.add(outgoingVector);
       }


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services