use of io.prestosql.spi.predicate.SortedRangeSet in project hetu-core by openlookeng.
the class TestLogicalPart method getBloomFilterEqualityResult.
private List<Page> getBloomFilterEqualityResult(LogicalPart logicalPart, Long domainValue, boolean bloomFilterReturn) {
Domain domain = Domain.create(ValueSet.ofRanges(equal(IntegerType.INTEGER, domainValue)), false);
Map<Integer, BloomFilter> bloomIdx = new HashMap<>();
bloomIdx.put(0, mock(BloomFilter.class));
ReflectionTestUtils.setField(logicalPart, "bloomIdx", bloomIdx);
LogicalPart spyLogicalPart = spy(logicalPart);
doReturn(bloomFilterReturn).when(spyLogicalPart).testFilter(Mockito.any(BloomFilter.class), eq(domainValue));
return spyLogicalPart.getPages(Collections.emptyMap(), ImmutableMap.of(0, ((SortedRangeSet) domain.getValues()).getOrderedRanges()), Collections.emptyMap());
}
use of io.prestosql.spi.predicate.SortedRangeSet in project hetu-core by openlookeng.
the class TestLogicalPart method getSparseFilterLessResult.
private List<Page> getSparseFilterLessResult(LogicalPart logicalPart, Long domainValue) {
Domain domain = Domain.create(ValueSet.ofRanges(lessThan(IntegerType.INTEGER, domainValue)), false);
List<Page> sparseResult = logicalPart.getPages(Collections.emptyMap(), Collections.emptyMap(), ImmutableMap.of(0, ((SortedRangeSet) domain.getValues()).getOrderedRanges()));
return sparseResult;
}
Aggregations