Interface MatrixSketch
-
- All Known Implementing Classes:
CountDistinctFunctionSketch,CountDistinctSketch,KMVSketch
public interface MatrixSketch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CorrMatrixBlockcreate(MatrixBlock blkIn)Create an initial sketch of a given block.MatrixBlockgetValue(MatrixBlock blkIn)Get scalar distinct count from an input matrix block.MatrixBlockgetValueFromSketch(CorrMatrixBlock blkIn)Obtain matrix distinct count value from estimation Used for estimating distinct in rows or columns.CorrMatrixBlockintersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)Intersect two sketchesCorrMatrixBlockunion(CorrMatrixBlock arg0, CorrMatrixBlock arg1)Union two sketches together to from a combined sketch.
-
-
-
Method Detail
-
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
CorrMatrixBlock create(MatrixBlock blkIn)
Create an initial sketch of a given block.- Parameters:
blkIn- A block to process- Returns:
- A sketch
-
union
CorrMatrixBlock union(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Union two sketches together to from a combined sketch.- Parameters:
arg0- Sketch onearg1- Sketch two- Returns:
- The sketch union is a sketch
-
intersection
CorrMatrixBlock intersection(CorrMatrixBlock arg0, CorrMatrixBlock arg1)
Intersect two sketches- Parameters:
arg0- Sketch onearg1- Sketch two- Returns:
- The sketch intersection is a sketch
-
-