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

x33g5p2x  于2022-01-29 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(110)

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

Range.contains介绍

暂无

代码示例

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

@Test
public void testContains()
{
  assertTrue(Range.all(BIGINT).contains(Range.all(BIGINT)));
  assertTrue(Range.all(BIGINT).contains(Range.equal(BIGINT, 0L)));
  assertTrue(Range.all(BIGINT).contains(Range.greaterThan(BIGINT, 0L)));
  assertTrue(Range.equal(BIGINT, 0L).contains(Range.equal(BIGINT, 0L)));
  assertFalse(Range.equal(BIGINT, 0L).contains(Range.greaterThan(BIGINT, 0L)));
  assertFalse(Range.equal(BIGINT, 0L).contains(Range.greaterThanOrEqual(BIGINT, 0L)));
  assertFalse(Range.equal(BIGINT, 0L).contains(Range.all(BIGINT)));
  assertTrue(Range.greaterThanOrEqual(BIGINT, 0L).contains(Range.greaterThan(BIGINT, 0L)));
  assertTrue(Range.greaterThan(BIGINT, 0L).contains(Range.greaterThan(BIGINT, 1L)));
  assertFalse(Range.greaterThan(BIGINT, 0L).contains(Range.lessThan(BIGINT, 0L)));
  assertTrue(Range.range(BIGINT, 0L, true, 2L, true).contains(Range.range(BIGINT, 1L, true, 2L, true)));
  assertFalse(Range.range(BIGINT, 0L, true, 2L, true).contains(Range.range(BIGINT, 1L, true, 3L, false)));
}

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

while (singleValueExclusions.hasNext() && range.contains(singleValueExclusions.peek())) {
  singleValuesInRange.add(literalEncoder.toExpression(singleValueExclusions.next().getSingleValue(), type));

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

while (singleValueExclusions.hasNext() && range.contains(singleValueExclusions.peek())) {
  singleValuesInRange.add(toExpression(singleValueExclusions.next().getSingleValue(), type));

相关文章