/** * Selects the blocks based on col max and min value. * * @param listOfDataBlocksToScan * @param dataRefNode */ private void addBlockBasedOnMinMaxValue(FilterExecuter filterExecuter, List<DataRefNode> listOfDataBlocksToScan, DataRefNode dataRefNode, boolean[] isMinMaxSet) { if (null == dataRefNode.getColumnsMinValue() || null == dataRefNode.getColumnsMaxValue()) { listOfDataBlocksToScan.add(dataRefNode); return; } BitSet bitSet = filterExecuter .isScanRequired(dataRefNode.getColumnsMaxValue(), dataRefNode.getColumnsMinValue(), isMinMaxSet); if (!bitSet.isEmpty()) { listOfDataBlocksToScan.add(dataRefNode); } }
private RawBlockletColumnChunks getNextBlockletColumnChunks() { RawBlockletColumnChunks rawBlockletColumnChunks = null; do { DataRefNode dataBlock = blockletIterator.next(); if (dataBlock.getColumnsMaxValue() == null || blockletScanner.isScanRequired(dataBlock)) { rawBlockletColumnChunks = RawBlockletColumnChunks.newInstance( blockExecutionInfo.getTotalNumberDimensionToRead(), blockExecutionInfo.getTotalNumberOfMeasureToRead(), fileReader, dataBlock); } } while (rawBlockletColumnChunks == null && blockletIterator.hasNext()); return rawBlockletColumnChunks; }
if (null == dataBlock.getColumnsMaxValue() || null == dataBlock.getColumnsMinValue()) { return true; bitSet = ((ImplicitColumnFilterExecutor) filterExecuter) .isFilterValuesPresentInBlockOrBlocklet( dataBlock.getColumnsMaxValue(), dataBlock.getColumnsMinValue(), blockletId, dataBlock.minMaxFlagArray()); } else { bitSet = this.filterExecuter .isScanRequired(dataBlock.getColumnsMaxValue(), dataBlock.getColumnsMinValue(), dataBlock.minMaxFlagArray());
public void scan() throws Exception { BlockletScannedResult blockletScannedResult = null; while (blockletIterator.hasNext()) { DataRefNode dataBlock = blockletIterator.next(); if (dataBlock.getColumnsMaxValue() == null || blockletScanner.isScanRequired(dataBlock)) { RawBlockletColumnChunks rawBlockletColumnChunks = RawBlockletColumnChunks.newInstance( blockExecutionInfo.getTotalNumberDimensionToRead(), blockExecutionInfo.getTotalNumberOfMeasureToRead(), fileReader, dataBlock); blockletScanner.readBlocklet(rawBlockletColumnChunks); blockletScannedResult = blockletScanner.scanBlocklet(rawBlockletColumnChunks); if (blockletScannedResult != null && blockletScannedResult.hasNext()) { scannedResults.add(blockletScannedResult); } } } fileReader.finish(); }