Class AllFacetsAggregator

    • Constructor Detail

      • AllFacetsAggregator

        public AllFacetsAggregator​(List<FacetAggregator<?>> facetAggregators)
    • Method Detail

      • withRow

        public AllFacetsState withRow​(AllFacetsState states,
                                      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<AllFacetsState>
        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
        the facet state updated with this row
      • withRecord

        public AllFacetsState withRecord​(AllFacetsState states,
                                         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<AllFacetsState>
        withRecord in class RowInRecordAggregator<AllFacetsState>
        states - the current aggregation state
        record - the record to ingest
        the aggregation state updated with this row
      • sum

        public AllFacetsState sum​(AllFacetsState first,
                                  AllFacetsState second)
        Description copied from interface: Combiner
        Merges two facet statistics from the same facet, computed on different sets of rows. This generally amounts to summing all the statistics internally. This function is required to be associative: sum(a, sum(b, c)) == sum(sum(a, b), c)
        the sum of both facet statistics
      • updateColumnStats

        protected<ColumnStats> updateColumnStats​(List<ColumnStats> statistics,
                                                                                         Row row)