java.lang.Object
org.apache.drill.exec.physical.impl.window.Partition

public class Partition extends Object
Used internally to keep track of partitions and frames.

A partition can be partial, which means we don't know "yet" the total number of records that are part of this partition. Even for partial partitions, we know the number of rows that are part of current frame

  • Field Details

    • row_number

      public int row_number
    • rank

      public int rank
    • dense_rank

      public int dense_rank
    • percent_rank

      public double percent_rank
    • cume_dist

      public double cume_dist
  • Constructor Details

    • Partition

      public Partition()
  • Method Details

    • getRemaining

      public long getRemaining()
      Returns:
      number of rows not yet aggregated in this partition
    • getLength

      public long getLength()
    • updateLength

      public void updateLength(long length, boolean partial)
      Parameters:
      length - number of rows in this partition
      partial - if true, then length is not the full length of the partition but just the number of rows in the current batch
    • rowAggregated

      public void rowAggregated()
    • newFrame

      public void newFrame(long peers)
    • isDone

      public boolean isDone()
    • ntile

      public int ntile(int numTiles)
    • isFrameDone

      public boolean isFrameDone()
    • toString

      public String toString()
      Overrides:
      toString in class Object