Interface GroupingProvider<DATA_TYPE>

All Known Subinterfaces:
KeyRangeGroupingProvider<DATA_TYPE>
All Known Implementing Classes:
ParallelDeferredGroupingProvider

public interface GroupingProvider<DATA_TYPE>
Interface used by DeferredGroupingColumnSource to compute groupings.
  • Method Details

    • makeGroupingProvider

      @NotNull static <DATA_TYPE> @NotNull GroupingProvider<DATA_TYPE> makeGroupingProvider(@NotNull @NotNull ColumnDefinition<DATA_TYPE> columnDefinition)
      Make a new GroupingProvider for the specified ColumnDefinition and current global configuration.
      Parameters:
      columnDefinition - The column definition
      Returns:
      A new GroupingProvider
    • getGroupToRange

      Map<DATA_TYPE,RowSet> 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

      Pair<Map<DATA_TYPE,RowSet>,Boolean> getGroupToRange(RowSet hint)
      Returns a grouping structure, possibly constructed on-demand; the grouping is only required to include groupings for values that exist within the hint RowSet; 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