Search in sources :

Example 1 with ProjectionBlockValSet

use of com.linkedin.pinot.core.operator.docvalsets.ProjectionBlockValSet in project pinot by linkedin.

the class RawIndexBenchmark method profileLookups.

/**
   * Profiles the lookup time for a given column, for the given docIds.
   *
   * @param segment Segment to profile
   * @param column Column to profile
   * @param docIds DocIds to lookup on the column
   * @return Time take in millis for the lookups
   */
private long profileLookups(IndexSegment segment, String column, int[] docIds) {
    BaseFilterOperator filterOperator = new TestFilterOperator(docIds);
    BReusableFilteredDocIdSetOperator docIdSetOperator = new BReusableFilteredDocIdSetOperator(filterOperator, docIds.length, DocIdSetPlanNode.MAX_DOC_PER_CALL);
    ProjectionBlock projectionBlock;
    MProjectionOperator projectionOperator = new MProjectionOperator(buildDataSourceMap(segment), docIdSetOperator);
    long start = System.currentTimeMillis();
    while ((projectionBlock = (ProjectionBlock) projectionOperator.nextBlock()) != null) {
        ProjectionBlockValSet blockValueSet = (ProjectionBlockValSet) projectionBlock.getBlockValueSet(column);
        blockValueSet.getDoubleValuesSV();
    }
    return (System.currentTimeMillis() - start);
}
Also used : MProjectionOperator(com.linkedin.pinot.core.operator.MProjectionOperator) ProjectionBlock(com.linkedin.pinot.core.operator.blocks.ProjectionBlock) BaseFilterOperator(com.linkedin.pinot.core.operator.filter.BaseFilterOperator) BReusableFilteredDocIdSetOperator(com.linkedin.pinot.core.operator.BReusableFilteredDocIdSetOperator) ProjectionBlockValSet(com.linkedin.pinot.core.operator.docvalsets.ProjectionBlockValSet)

Aggregations

BReusableFilteredDocIdSetOperator (com.linkedin.pinot.core.operator.BReusableFilteredDocIdSetOperator)1 MProjectionOperator (com.linkedin.pinot.core.operator.MProjectionOperator)1 ProjectionBlock (com.linkedin.pinot.core.operator.blocks.ProjectionBlock)1 ProjectionBlockValSet (com.linkedin.pinot.core.operator.docvalsets.ProjectionBlockValSet)1 BaseFilterOperator (com.linkedin.pinot.core.operator.filter.BaseFilterOperator)1