Class ExpressionValueFacetAggregator<T extends FacetState>

    • Field Detail

      • _invert

        protected final boolean _invert
    • Constructor Detail

      • ExpressionValueFacetAggregator

        public ExpressionValueFacetAggregator​(boolean invert,
                                              RowEvaluable eval)
        Parameters:
        invert - used to generate the record filter
        eval - the evaluable to run on each row
    • Method Detail

      • withValue

        protected abstract T withValue​(T state,
                                       Object value,
                                       boolean inView)
        Method to be implemented by subclasses to aggregate a value to their state. The value is guaranteed not to be a collection, it can be aggregated as such.
        Parameters:
        state - the current aggregation state
        value - the value to aggregate
        inView - whether the value is in view (in the rows selected by other facets) or not.
        Returns:
        the new aggregation state
      • withRow

        public T withRow​(T state,
                         long rowId,
                         Row row,
                         Record record)
        Description copied from class: RowInRecordAggregator
        Adds statistics obtained from a single row to the facet state. Given that facet states are expected to be immutable, this returns a new facet state object.
        Specified by:
        withRow in class RowInRecordAggregator<T extends FacetState>
        rowId - the row id of the row to ingest
        row - the row to ingest
        record - the enclosing record of the row, if available (in records mode), null otherwise
        Returns:
        the facet state updated with this row
      • withRowOutsideView

        public T withRowOutsideView​(T state,
                                    long rowId,
                                    Row row,
                                    Record record)
        Description copied from class: FacetAggregator
        Like RowAggregator.withRow(Object, long, Row)} except that this method is called on rows that are excluded by at least two facets, so the values in this row do not normally count towards the statistics displayed in facets. This is useful for facets which require computing global statistics on the entire dataset regardless of which filtering is in place.
        Overrides:
        withRowOutsideView in class FacetAggregator<T extends FacetState>
        rowId - the row id of the row to ingest
        row - the row to ingest
        record - the enclosing record of the row if available, null otherwise
        Returns:
        the facet state updated with this row