use of com.pingcap.tikv.key.IndexScanKeyRangeBuilder in project tispark by pingcap.
the class TiKVScanAnalyzer method buildIndexScanKeyRangeWithIds.
@VisibleForTesting
private Map<Long, List<KeyRange>> buildIndexScanKeyRangeWithIds(List<Long> ids, TiIndexInfo index, List<IndexRange> indexRanges) {
Map<Long, List<KeyRange>> idRanges = new HashMap<>();
for (long id : ids) {
List<KeyRange> ranges = new ArrayList<>(indexRanges.size());
for (IndexRange ir : indexRanges) {
IndexScanKeyRangeBuilder indexScanKeyRangeBuilder = new IndexScanKeyRangeBuilder(id, index, ir);
ranges.add(indexScanKeyRangeBuilder.compute());
}
idRanges.put(id, ranges);
}
return idRanges;
}
Aggregations