Class DefaultGroupPartitioner
- java.lang.Object
-
- org.apache.druid.query.rowsandcols.semantic.DefaultGroupPartitioner
-
- All Implemented Interfaces:
GroupPartitioner
public class DefaultGroupPartitioner extends Object implements GroupPartitioner
-
-
Constructor Summary
Constructors Constructor Description DefaultGroupPartitioner(RowsAndColumns rac)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
computeGroupings(List<String> columns)
Computes the groupings of the underlying rows based on the columns passed in for grouping.
-
-
-
Constructor Detail
-
DefaultGroupPartitioner
public DefaultGroupPartitioner(RowsAndColumns rac)
-
-
Method Detail
-
computeGroupings
public int[] computeGroupings(List<String> columns)
Description copied from interface:GroupPartitioner
Computes the groupings of the underlying rows based on the columns passed in for grouping. The grouping is returned as an int[], the length of the array will be equal to the number of rows of data and the values of the elements of the array will be the same when the rows are part of the same group and different when the rows are part of different groups. This is contrasted with the SortedGroupPartitioner in that, the groupings returned are not necessarily contiguous. There is also no sort-order implied by the `int` values assigned to each grouping.- Specified by:
computeGroupings
in interfaceGroupPartitioner
- Parameters:
columns
- the columns to group with- Returns:
- the groupings, rows with the same int value are in the same group. There is no sort-order implied by the int values.
-
-