Interface MatrixSketch

All Known Implementing Classes:
CountDistinctFunctionSketch, CountDistinctSketch, KMVSketch

public interface MatrixSketch
  • Method Details

    • getValue

      MatrixBlock getValue(MatrixBlock blkIn)
      Get scalar distinct count from an input matrix block.
      Parameters:
      blkIn - An input block to estimate the number of distinct values in
      Returns:
      The result matrix block containing the distinct count estimate
    • getValueFromSketch

      MatrixBlock getValueFromSketch(CorrMatrixBlock blkIn)
      Obtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.
      Parameters:
      blkIn - The sketch block to extract the count from
      Returns:
      The result matrix block
    • create

      Create an initial sketch of a given block.
      Parameters:
      blkIn - A block to process
      Returns:
      A sketch
    • union

      Union two sketches together to from a combined sketch.
      Parameters:
      arg0 - Sketch one
      arg1 - Sketch two
      Returns:
      The sketch union is a sketch
    • intersection

      CorrMatrixBlock intersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
      Intersect two sketches
      Parameters:
      arg0 - Sketch one
      arg1 - Sketch two
      Returns:
      The sketch intersection is a sketch