com.facebook.presto.spi.predicate.Marker.greaterAdjacent()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中com.facebook.presto.spi.predicate.Marker.greaterAdjacent()方法的一些代码示例,展示了Marker.greaterAdjacent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marker.greaterAdjacent()方法的具体详情如下:
包路径:com.facebook.presto.spi.predicate.Marker
类名称:Marker
方法名:greaterAdjacent

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();
}

相关文章