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

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

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

Marker.isUpperUnbounded介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

public boolean isAll()
{
  return low.isLowerUnbounded() && high.isUpperUnbounded();
}

代码示例来源:origin: prestodb/presto

public String toString(ConnectorSession session)
  {
    StringBuilder buffer = new StringBuilder("{");
    buffer.append("type=").append(type);
    buffer.append(", value=");
    if (isLowerUnbounded()) {
      buffer.append("<min>");
    }
    else if (isUpperUnbounded()) {
      buffer.append("<max>");
    }
    else {
      buffer.append(getPrintableValue(session));
    }
    buffer.append(", bound=").append(bound);
    buffer.append("}");
    return buffer.toString();
  }
}

代码示例来源:origin: prestodb/presto

/**
 * Adjacency is defined by two Markers being infinitesimally close to each other.
 * This means they must share the same value and have adjacent Bounds.
 */
public boolean isAdjacent(Marker other)
{
  checkTypeCompatibility(other);
  if (isUpperUnbounded() || isLowerUnbounded() || other.isUpperUnbounded() || other.isLowerUnbounded()) {
    return false;
  }
  if (type.compareTo(valueBlock.get(), 0, other.valueBlock.get(), 0) != 0) {
    return false;
  }
  return (bound == Bound.EXACTLY && other.bound != Bound.EXACTLY) ||
      (bound != Bound.EXACTLY && other.bound == Bound.EXACTLY);
}

代码示例来源:origin: prestodb/presto

public String toString(ConnectorSession session)
  {
    StringBuilder buffer = new StringBuilder();
    if (isSingleValue()) {
      buffer.append('[').append(low.getPrintableValue(session)).append(']');
    }
    else {
      buffer.append((low.getBound() == Marker.Bound.EXACTLY) ? '[' : '(');
      buffer.append(low.isLowerUnbounded() ? "<min>" : low.getPrintableValue(session));
      buffer.append(", ");
      buffer.append(high.isUpperUnbounded() ? "<max>" : high.getPrintableValue(session));
      buffer.append((high.getBound() == Marker.Bound.EXACTLY) ? ']' : ')');
    }
    return buffer.toString();
  }
}

代码示例来源:origin: prestodb/presto

if (isUpperUnbounded()) {
  return o.isUpperUnbounded() ? 0 : 1;
if (o.isUpperUnbounded()) {
  return -1;

代码示例来源:origin: prestodb/presto

if (range.getHigh().isUpperUnbounded()) {
  builder.append("<max>");

代码示例来源:origin: prestodb/presto

private static OptionalInt extractUpperBound(TupleDomain<Symbol> tupleDomain, Symbol symbol)
{
  if (tupleDomain.isNone()) {
    return OptionalInt.empty();
  }
  Domain rowNumberDomain = tupleDomain.getDomains().get().get(symbol);
  if (rowNumberDomain == null) {
    return OptionalInt.empty();
  }
  ValueSet values = rowNumberDomain.getValues();
  if (values.isAll() || values.isNone() || values.getRanges().getRangeCount() <= 0) {
    return OptionalInt.empty();
  }
  Range span = values.getRanges().getSpan();
  if (span.getHigh().isUpperUnbounded()) {
    return OptionalInt.empty();
  }
  verify(rowNumberDomain.getType().equals(BIGINT));
  long upperBound = (Long) span.getHigh().getValue();
  if (span.getHigh().getBound() == BELOW) {
    upperBound--;
  }
  if (upperBound > 0 && upperBound <= Integer.MAX_VALUE) {
    return OptionalInt.of(toIntExact(upperBound));
  }
  return OptionalInt.empty();
}

代码示例来源:origin: prestodb/presto

@Test
public void testUnbounded()
{
  assertTrue(Marker.lowerUnbounded(BIGINT).isLowerUnbounded());
  assertFalse(Marker.lowerUnbounded(BIGINT).isUpperUnbounded());
  assertTrue(Marker.upperUnbounded(BIGINT).isUpperUnbounded());
  assertFalse(Marker.upperUnbounded(BIGINT).isLowerUnbounded());
  assertFalse(Marker.below(BIGINT, 1L).isLowerUnbounded());
  assertFalse(Marker.below(BIGINT, 1L).isUpperUnbounded());
  assertFalse(Marker.exactly(BIGINT, 1L).isLowerUnbounded());
  assertFalse(Marker.exactly(BIGINT, 1L).isUpperUnbounded());
  assertFalse(Marker.above(BIGINT, 1L).isLowerUnbounded());
  assertFalse(Marker.above(BIGINT, 1L).isUpperUnbounded());
}

代码示例来源:origin: prestodb/presto

if (!range.getHigh().isUpperUnbounded()) {
  switch (range.getHigh().getBound()) {
    case ABOVE:

代码示例来源:origin: prestodb/presto

private static boolean isBetween(Range range)
{
  return !range.getLow().isLowerUnbounded() && range.getLow().getBound() == Marker.Bound.EXACTLY
      && !range.getHigh().isUpperUnbounded() && range.getHigh().getBound() == Marker.Bound.EXACTLY;
}

代码示例来源:origin: prestodb/presto

if (!range.getHigh().isUpperUnbounded()) {
  switch (range.getHigh().getBound()) {
    case ABOVE:

代码示例来源: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

if (!range.getHigh().isUpperUnbounded()) {
  switch (range.getHigh().getBound()) {
    case ABOVE:

代码示例来源:origin: prestodb/presto

if (!range.getHigh().isUpperUnbounded()) {
  switch (range.getHigh().getBound()) {
    case ABOVE:

代码示例来源:origin: prestodb/presto

if (!range.getHigh().isUpperUnbounded()) {
  switch (range.getHigh().getBound()) {
    case ABOVE:

代码示例来源:origin: prestodb/presto

if (!range.getHigh().isUpperUnbounded()) {
  switch (range.getHigh().getBound()) {
    case EXACTLY:

代码示例来源:origin: prestodb/presto

accumuloRange = new Range(null, false, split, inclusive);
else if (prestoRange.getHigh().isUpperUnbounded()) {

代码示例来源:origin: prestodb/presto

if (!high.isUpperUnbounded()) {
  KuduPredicate.ComparisonOp op = (low.getBound() == Marker.Bound.BELOW)
      ? KuduPredicate.ComparisonOp.LESS : KuduPredicate.ComparisonOp.LESS_EQUAL;

代码示例来源:origin: com.facebook.presto/presto-spi

public boolean isAll()
{
  return low.isLowerUnbounded() && high.isUpperUnbounded();
}

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

private static boolean isBetween(Range range)
{
  return !range.getLow().isLowerUnbounded() && range.getLow().getBound() == Marker.Bound.EXACTLY
      && !range.getHigh().isUpperUnbounded() && range.getHigh().getBound() == Marker.Bound.EXACTLY;
}

相关文章