Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/1073#discussion_r158591666
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java
---
@@ -341,6 +351,10 @@ public void close() throws Exception {
updateAggregateStats();
partitioner.clear();
}
+
+ if (closeIncoming) {
+ ((CloseableRecordBatch) incoming).close();
+ }
--- End diff --
OK, let's limit scope to stay on schedule. Please include a comment that
explains the above, perhaps in the `OrderedPartitionSenderCreator` class.
As you described, the proper solution would be to simply add both operators
to the stack of operators that the fragment executor should close. But, since
the code assumes that each builder builds a single operator, fixing this design
flaw does, as you noted, require changes that are out of scope.
---