Class ComposedBitmapIndexAggregate


  • public class ComposedBitmapIndexAggregate
    extends Object
    Transform a tree of Boolean expressions into a tree of bitwise operations on streams of bitmaps. So, AND turns into BITAND and OR into BITOR, with the leaves of the streams being scans of a BITMAP_VALUE index keyed by the leaf condition. Optional additional grouping predicates for all indexes are also preserved.
    • Method Detail

      • tryBuild

        @Nonnull
        public static Optional<ComposedBitmapIndexAggregate> tryBuild​(@Nonnull
                                                                      RecordQueryPlanner planner,
                                                                      @Nonnull
                                                                      Collection<String> recordTypeNames,
                                                                      @Nonnull
                                                                      IndexAggregateFunction indexAggregateFunction,
                                                                      @Nonnull
                                                                      QueryComponent filter)
        Try to build a composed bitmap for the given aggregate function and filters.

        The function should use a supported aggregate function (currently "bitmap_value") and the bitmap-indexed position field grouped by any common fields. The filter should supply equality conditions to the common fields. The filter can include additional equality conditions on various other fields for which there are appropriate bitmap indexes, in a Boolean expression that will be transformed into a set the corresponding bit operations on the bitmaps. The filter can also include range conditions on the position field.

        Parameters:
        planner - a query planner to use to construct the plans
        recordTypeNames - the record types on which the indexes are defined
        indexAggregateFunction - the function giving the desired position and grouping
        filter - conditions on the groups and position
        Returns:
        an Optional composed bitmap or Optional.empty if there conditions could not be satisfied