public int getTotalBlocks() { if (isLegacyStore) { // dummy value return 0; } else { return memoryDMStore.getRowCount(); } }
@Override protected int getTotalBlocklets() { if (isLegacyStore) { return super.getTotalBlocklets(); } else { return memoryDMStore.getRowCount(); } }
@Override public List<Blocklet> prune(FilterResolverIntf filterExp, SegmentProperties segmentProperties, List<PartitionSpec> partitions) { if (memoryDMStore.getRowCount() == 0) { return new ArrayList<>(); } // if it has partitioned datamap but there is no partitioned information stored, it means // partitions are dropped so return empty list. if (partitions != null) { if (!validatePartitionInfo(partitions)) { return new ArrayList<>(); } } // Prune with filters if the partitions are existed in this datamap // changed segmentProperties to this.segmentProperties to make sure the pruning with its own // segmentProperties. // Its a temporary fix. The Interface DataMap.prune(FilterResolverIntf filterExp, // SegmentProperties segmentProperties, List<PartitionSpec> partitions) should be corrected return prune(filterExp); }
private byte[] getBlockletRowCountForEachBlock() { // taskSummary DM store will have only one row CarbonRowSchema[] taskSummarySchema = getTaskSummarySchema(); return taskSummaryDMStore .getDataMapRow(taskSummarySchema, taskSummaryDMStore.getRowCount() - 1) .getByteArray(taskSummarySchema.length - 1); }
@Override public boolean isScanRequired(FilterResolverIntf filterExp) { FilterExecuter filterExecuter = FilterUtil .getFilterExecuterTree(filterExp, getSegmentProperties(), null, getMinMaxCacheColumns()); DataMapRow unsafeRow = taskSummaryDMStore .getDataMapRow(getTaskSummarySchema(), taskSummaryDMStore.getRowCount() - 1); boolean isScanRequired = FilterExpressionProcessor .isScanRequired(filterExecuter, getMinMaxValue(unsafeRow, TASK_MAX_VALUES_INDEX), getMinMaxValue(unsafeRow, TASK_MIN_VALUES_INDEX), getMinMaxFlag(unsafeRow, TASK_MIN_MAX_FLAG)); if (isScanRequired) { return true; } return false; }
private List<Blocklet> prune(FilterResolverIntf filterExp) { if (memoryDMStore.getRowCount() == 0) { return new ArrayList<>(); CarbonRowSchema[] schema = getFileFooterEntrySchema(); String filePath = getFilePath(); int numEntries = memoryDMStore.getRowCount(); int totalBlocklets = getTotalBlocklets(); int hitBlocklets = 0;