Class OrderedPartitionSenderCreator

java.lang.Object
org.apache.drill.exec.physical.impl.orderedpartitioner.OrderedPartitionSenderCreator
All Implemented Interfaces:
RootCreator<OrderedPartitionSender>

public class OrderedPartitionSenderCreator extends Object implements RootCreator<OrderedPartitionSender>

Known Issues:

Creation of batches

The FragmentExecutor is only aware of the operators in the tree that it has a reference too. In the case of the OrderedPartitionSenderCreator, an upstream RecordBatch is wrapped in an OrderedPartitionRecordBatch. Since the OrderedPartitionRecordBatch is instantiated in the creator the FragmentExecutor does not have a reference to it. So when the FragmentExecutor closes the operators it closes the original operator, but not not the wrapping OrderedPartitionSenderCreator. This is an issue since the OrderedPartitionSenderCreator allocates VectorContainers which are consequentially never released.

  1. We change the Creators in some way to communicate to the FragmentExecutor that they have wrapped an operator, so the FragmentExecutor can close the wrapped operator instead of the original operator.
  2. Or we take a less invasive approach and simply tell the PartitionSenderRootExec whether to close the wrapped operator.

For now we've taken approach 2. In the future we should we should implement approach 1.