本文整理了Java中com.facebook.presto.spi.predicate.Marker.greaterAdjacent()
方法的一些代码示例,展示了Marker.greaterAdjacent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marker.greaterAdjacent()
方法的具体详情如下:
包路径:com.facebook.presto.spi.predicate.Marker
类名称:Marker
方法名:greaterAdjacent
暂无
代码示例来源:origin: prestodb/presto
@Override
public SortedRangeSet complement()
{
Builder builder = new Builder(type);
if (lowIndexedRanges.isEmpty()) {
return builder.add(Range.all(type)).build();
}
Iterator<Range> rangeIterator = lowIndexedRanges.values().iterator();
Range firstRange = rangeIterator.next();
if (!firstRange.getLow().isLowerUnbounded()) {
builder.add(new Range(Marker.lowerUnbounded(type), firstRange.getLow().lesserAdjacent()));
}
Range previousRange = firstRange;
while (rangeIterator.hasNext()) {
Range currentRange = rangeIterator.next();
Marker lowMarker = previousRange.getHigh().greaterAdjacent();
Marker highMarker = currentRange.getLow().lesserAdjacent();
builder.add(new Range(lowMarker, highMarker));
previousRange = currentRange;
}
Range lastRange = previousRange;
if (!lastRange.getHigh().isUpperUnbounded()) {
builder.add(new Range(lastRange.getHigh().greaterAdjacent(), Marker.upperUnbounded(type)));
}
return builder.build();
}
代码示例来源:origin: prestodb/presto
assertEquals(Marker.below(BIGINT, 1L).greaterAdjacent(), Marker.exactly(BIGINT, 1L));
assertEquals(Marker.exactly(BIGINT, 1L).greaterAdjacent(), Marker.above(BIGINT, 1L));
assertEquals(Marker.above(BIGINT, 1L).lesserAdjacent(), Marker.exactly(BIGINT, 1L));
assertEquals(Marker.exactly(BIGINT, 1L).lesserAdjacent(), Marker.below(BIGINT, 1L));
Marker.above(BIGINT, 1L).greaterAdjacent();
fail();
Marker.lowerUnbounded(BIGINT).greaterAdjacent();
fail();
Marker.upperUnbounded(BIGINT).greaterAdjacent();
fail();
代码示例来源:origin: com.facebook.presto/presto-spi
@Override
public SortedRangeSet complement()
{
Builder builder = new Builder(type);
if (lowIndexedRanges.isEmpty()) {
return builder.add(Range.all(type)).build();
}
Iterator<Range> rangeIterator = lowIndexedRanges.values().iterator();
Range firstRange = rangeIterator.next();
if (!firstRange.getLow().isLowerUnbounded()) {
builder.add(new Range(Marker.lowerUnbounded(type), firstRange.getLow().lesserAdjacent()));
}
Range previousRange = firstRange;
while (rangeIterator.hasNext()) {
Range currentRange = rangeIterator.next();
Marker lowMarker = previousRange.getHigh().greaterAdjacent();
Marker highMarker = currentRange.getLow().lesserAdjacent();
builder.add(new Range(lowMarker, highMarker));
previousRange = currentRange;
}
Range lastRange = previousRange;
if (!lastRange.getHigh().isUpperUnbounded()) {
builder.add(new Range(lastRange.getHigh().greaterAdjacent(), Marker.upperUnbounded(type)));
}
return builder.build();
}
内容来源于网络,如有侵权,请联系作者删除!