Package com.illumon.iris.db.v2.locations
Interface GroupingProvider<DATA_TYPE>
- All Known Subinterfaces:
KeyRangeGroupingProvider<DATA_TYPE>
public interface GroupingProvider<DATA_TYPE>
Interface used by
DeferredGroupingColumnSource
to compute groupings.-
Method Summary
Modifier and Type Method Description Map<DATA_TYPE,ReadOnlyIndex>
getGroupToRange()
Returns a grouping structure, possibly constructed on-demand.com.fishlib.base.Pair<Map<DATA_TYPE,ReadOnlyIndex>,Boolean>
getGroupToRange(ReadOnlyIndex hint)
Returns a grouping structure, possibly constructed on-demand; the grouping is only required to include groupings for values that exist within the hint Index; but it may include more.static <DATA_TYPE>
GroupingProvider<DATA_TYPE>makeGroupingProvider(com.illumon.dataobjects.ColumnDefinition<DATA_TYPE> columnDefinition, com.fishlib.io.logger.Logger log)
Make a newGroupingProvider
for the specifiedColumnDefinition
and current global configuration.
-
Method Details
-
makeGroupingProvider
@NotNull static <DATA_TYPE> GroupingProvider<DATA_TYPE> makeGroupingProvider(@NotNull com.illumon.dataobjects.ColumnDefinition<DATA_TYPE> columnDefinition, com.fishlib.io.logger.Logger log)Make a newGroupingProvider
for the specifiedColumnDefinition
and current global configuration.- Parameters:
columnDefinition
- The column definitionlog
-- Returns:
- A new
GroupingProvider
-
getGroupToRange
Map<DATA_TYPE,ReadOnlyIndex> getGroupToRange()Returns a grouping structure, possibly constructed on-demand.- Returns:
- a Map from grouping keys to Indices, or null if the group could not be constructed
-
getGroupToRange
Returns a grouping structure, possibly constructed on-demand; the grouping is only required to include groupings for values that exist within the hint Index; but it may include more. The hint allows the underlying implementation to optionally optimize out groupings that do not overlap hint.The return value is a pair, containing a "complete" indicator. If the complete indicator is true, then the caller may safely cache the resultant Map.
- Parameters:
hint
- required indices within the resultant Map- Returns:
- a Pair containing a Map from grouping keys to Indices, which includes at least the hint indices; and a Boolean which indicates that the grouping is complete
-