本文整理了Java中com.facebook.presto.spi.predicate.Range.contains
方法的一些代码示例,展示了Range.contains
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Range.contains
方法的具体详情如下:
包路径:com.facebook.presto.spi.predicate.Range
类名称: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));
内容来源于网络,如有侵权,请联系作者删除!