本文整理了Java中com.facebook.presto.spi.predicate.Marker.getType()
方法的一些代码示例,展示了Marker.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marker.getType()
方法的具体详情如下:
包路径:com.facebook.presto.spi.predicate.Marker
类名称:Marker
方法名:getType
暂无
代码示例来源:origin: prestodb/presto
public Type getType()
{
return low.getType();
}
代码示例来源:origin: prestodb/presto
private void checkTypeCompatibility(Marker marker)
{
if (!type.equals(marker.getType())) {
throw new IllegalArgumentException(String.format("Mismatched Marker types: %s vs %s", type, marker.getType()));
}
}
代码示例来源:origin: prestodb/presto
private void checkTypeCompatibility(Marker marker)
{
if (!getType().equals(marker.getType())) {
throw new IllegalStateException(String.format("Marker of %s does not match SortedRangeSet of %s", marker.getType(), getType()));
}
}
代码示例来源:origin: prestodb/presto
private void checkTypeCompatibility(Marker marker)
{
if (!getType().equals(marker.getType())) {
throw new IllegalArgumentException(String.format("Marker of %s does not match Range of %s", marker.getType(), getType()));
}
}
代码示例来源:origin: prestodb/presto
@JsonCreator
public Range(
@JsonProperty("low") Marker low,
@JsonProperty("high") Marker high)
{
requireNonNull(low, "value is null");
requireNonNull(high, "value is null");
if (!low.getType().equals(high.getType())) {
throw new IllegalArgumentException(String.format("Marker types do not match: %s vs %s", low.getType(), high.getType()));
}
if (low.getBound() == Marker.Bound.BELOW) {
throw new IllegalArgumentException("low bound must be EXACTLY or ABOVE");
}
if (high.getBound() == Marker.Bound.ABOVE) {
throw new IllegalArgumentException("high bound must be EXACTLY or BELOW");
}
if (low.compareTo(high) > 0) {
throw new IllegalArgumentException("low must be less than or equal to high");
}
this.low = low;
this.high = high;
}
代码示例来源:origin: prestodb/presto
@Test
public void testTypes()
{
assertEquals(Marker.lowerUnbounded(BIGINT).getType(), BIGINT);
assertEquals(Marker.below(BIGINT, 1L).getType(), BIGINT);
assertEquals(Marker.exactly(BIGINT, 1L).getType(), BIGINT);
assertEquals(Marker.above(BIGINT, 1L).getType(), BIGINT);
assertEquals(Marker.upperUnbounded(BIGINT).getType(), BIGINT);
}
代码示例来源:origin: prestodb/presto
public static PrestoThriftMarker fromMarker(Marker marker)
{
PrestoThriftBlock value = marker.getValueBlock().isPresent() ? fromBlock(marker.getValueBlock().get(), marker.getType()) : null;
return new PrestoThriftMarker(value, fromBound(marker.getBound()));
}
}
代码示例来源:origin: prestodb/presto
private FormattedMarker formatMarker(Marker marker)
{
if (!marker.getValueBlock().isPresent()) {
return new FormattedMarker(Optional.empty(), marker.getBound());
}
return new FormattedMarker(Optional.of(getVarcharValue(marker.getType(), marker.getValue())), marker.getBound());
}
代码示例来源:origin: com.facebook.presto/presto-spi
public Type getType()
{
return low.getType();
}
代码示例来源:origin: com.facebook.presto/presto-spi
private void checkTypeCompatibility(Marker marker)
{
if (!type.equals(marker.getType())) {
throw new IllegalArgumentException(String.format("Mismatched Marker types: %s vs %s", type, marker.getType()));
}
}
代码示例来源:origin: com.facebook.presto/presto-spi
private void checkTypeCompatibility(Marker marker)
{
if (!getType().equals(marker.getType())) {
throw new IllegalStateException(String.format("Marker of %s does not match SortedRangeSet of %s", marker.getType(), getType()));
}
}
代码示例来源:origin: com.facebook.presto/presto-spi
private void checkTypeCompatibility(Marker marker)
{
if (!getType().equals(marker.getType())) {
throw new IllegalArgumentException(String.format("Marker of %s does not match Range of %s", marker.getType(), getType()));
}
}
代码示例来源:origin: com.facebook.presto/presto-spi
@JsonCreator
public Range(
@JsonProperty("low") Marker low,
@JsonProperty("high") Marker high)
{
requireNonNull(low, "value is null");
requireNonNull(high, "value is null");
if (!low.getType().equals(high.getType())) {
throw new IllegalArgumentException(String.format("Marker types do not match: %s vs %s", low.getType(), high.getType()));
}
if (low.getBound() == Marker.Bound.BELOW) {
throw new IllegalArgumentException("low bound must be EXACTLY or ABOVE");
}
if (high.getBound() == Marker.Bound.ABOVE) {
throw new IllegalArgumentException("high bound must be EXACTLY or BELOW");
}
if (low.compareTo(high) > 0) {
throw new IllegalArgumentException("low must be less than or equal to high");
}
this.low = low;
this.high = high;
}
内容来源于网络,如有侵权,请联系作者删除!