Search in sources :

Example 1 with ScanBasedSingleValueDocIdSet

use of com.linkedin.pinot.core.operator.docidsets.ScanBasedSingleValueDocIdSet in project pinot by linkedin.

the class ScanBasedFilterOperator method nextFilterBlock.

@Override
public BaseFilterBlock nextFilterBlock(BlockId BlockId) {
    DataSourceMetadata dataSourceMetadata = dataSource.getDataSourceMetadata();
    FilterBlockDocIdSet docIdSet;
    Block nextBlock = dataSource.nextBlock();
    BlockValSet blockValueSet = nextBlock.getBlockValueSet();
    BlockMetadata blockMetadata = nextBlock.getMetadata();
    if (dataSourceMetadata.isSingleValue()) {
        docIdSet = new ScanBasedSingleValueDocIdSet(dataSource.getOperatorName(), blockValueSet, blockMetadata, predicateEvaluator);
    } else {
        docIdSet = new ScanBasedMultiValueDocIdSet(dataSource.getOperatorName(), blockValueSet, blockMetadata, predicateEvaluator);
    }
    if (startDocId != null) {
        docIdSet.setStartDocId(startDocId);
    }
    if (endDocId != null) {
        docIdSet.setEndDocId(endDocId);
    }
    return new ScanBlock(docIdSet);
}
Also used : DataSourceMetadata(com.linkedin.pinot.core.common.DataSourceMetadata) ScanBasedSingleValueDocIdSet(com.linkedin.pinot.core.operator.docidsets.ScanBasedSingleValueDocIdSet) BlockMetadata(com.linkedin.pinot.core.common.BlockMetadata) Block(com.linkedin.pinot.core.common.Block) BaseFilterBlock(com.linkedin.pinot.core.operator.blocks.BaseFilterBlock) BlockValSet(com.linkedin.pinot.core.common.BlockValSet) FilterBlockDocIdSet(com.linkedin.pinot.core.operator.docidsets.FilterBlockDocIdSet) ScanBasedMultiValueDocIdSet(com.linkedin.pinot.core.operator.docidsets.ScanBasedMultiValueDocIdSet)

Aggregations

Block (com.linkedin.pinot.core.common.Block)1 BlockMetadata (com.linkedin.pinot.core.common.BlockMetadata)1 BlockValSet (com.linkedin.pinot.core.common.BlockValSet)1 DataSourceMetadata (com.linkedin.pinot.core.common.DataSourceMetadata)1 BaseFilterBlock (com.linkedin.pinot.core.operator.blocks.BaseFilterBlock)1 FilterBlockDocIdSet (com.linkedin.pinot.core.operator.docidsets.FilterBlockDocIdSet)1 ScanBasedMultiValueDocIdSet (com.linkedin.pinot.core.operator.docidsets.ScanBasedMultiValueDocIdSet)1 ScanBasedSingleValueDocIdSet (com.linkedin.pinot.core.operator.docidsets.ScanBasedSingleValueDocIdSet)1