java.lang.Object
org.apache.drill.exec.physical.impl.xsort.SortImpl

public class SortImpl extends Object
Implementation of the external sort which is wrapped into the Drill "next" protocol by the ExternalSortBatch class.

Accepts incoming batches. Sorts each and will spill to disk as needed. When all input is delivered, can either do an in-memory merge or a merge from disk. If runs spilled, may have to do one or more "consolidation" passes to reduce the number of runs to the level that will fit in memory.