Class RowInRecordAggregator<T extends FacetState>

    • Constructor Detail

      • RowInRecordAggregator

        public RowInRecordAggregator()
    • Method Detail

      • withRow

        public abstract T withRow​(T state,
                                  long rowId,
                                  Row row,
                                  Record record)
        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.
        Parameters:
        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
      • withRow

        public T withRow​(T state,
                         long rowId,
                         Row row)
        Description copied from interface: RowAggregator
        Adds statistics obtained from a single row to the aggregation state. Given that states are expected to be immutable, this returns a aggregation state object. This function is required to be associative with the combining function: combine(a, withRow(b, rowId, row)) == withRow(combine(a, b), rowId, row)
        Specified by:
        withRow in interface RowAggregator<T extends FacetState>
        rowId - the row id of the row to ingest
        row - the row to ingest
        Returns:
        the aggregation state updated with this row
      • withRecord

        public T withRecord​(T state,
                            Record record)
        Description copied from interface: RecordAggregator
        Adds statistics obtained from a single record to the aggregation state. Given that states are expected to be immutable, this returns a new aggregation state object. This function is required to be associative with the combining function: combine(a, withRecord(b, record)) == withRecord(combine(a, b), record)
        Specified by:
        withRecord in interface RecordAggregator<T extends FacetState>
        Parameters:
        state - the current aggregation state
        record - the record to ingest
        Returns:
        the aggregation state updated with this row