congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.facebook.presto.spi.predicate
Code IndexAdd Tabnine to your IDE (free)

How to use com.facebook.presto.spi.predicate

Best Java code snippets using com.facebook.presto.spi.predicate (Showing top 20 results out of 414)

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

public Range span(Range other)
{
  checkTypeCompatibility(other);
  Marker lowMarker = Marker.min(low, other.getLow());
  Marker highMarker = Marker.max(high, other.getHigh());
  return new Range(lowMarker, highMarker);
}
origin: prestodb/presto

public boolean overlaps(Range other)
{
  checkTypeCompatibility(other);
  return this.getLow().compareTo(other.getHigh()) <= 0 &&
      other.getLow().compareTo(this.getHigh()) <= 0;
}
origin: prestodb/presto

public Domain subtract(Domain other)
{
  checkCompatibility(other);
  return new Domain(values.subtract(other.getValues()), this.isNullAllowed() && !other.isNullAllowed());
}
origin: prestodb/presto

public Domain intersect(Domain other)
{
  checkCompatibility(other);
  return new Domain(values.intersect(other.getValues()), this.isNullAllowed() && other.isNullAllowed());
}
origin: prestodb/presto

public Domain union(Domain other)
{
  checkCompatibility(other);
  return new Domain(values.union(other.getValues()), this.isNullAllowed() || other.isNullAllowed());
}
origin: prestodb/presto

public static Domain notNull(Type type)
{
  return new Domain(ValueSet.all(type), false);
}
origin: prestodb/presto

@Override
public SortedRangeSet union(Collection<ValueSet> valueSets)
{
  Builder builder = new Builder(type);
  builder.addAll(this.getOrderedRanges());
  for (ValueSet valueSet : valueSets) {
    builder.addAll(checkCompatibility(valueSet).getOrderedRanges());
  }
  return builder.build();
}
origin: prestodb/presto

public static Range range(Type type, Object low, boolean lowInclusive, Object high, boolean highInclusive)
{
  Marker lowMarker = lowInclusive ? Marker.exactly(type, low) : Marker.above(type, low);
  Marker highMarker = highInclusive ? Marker.exactly(type, high) : Marker.below(type, high);
  return new Range(lowMarker, highMarker);
}
origin: prestodb/presto

public Domain complement()
{
  return new Domain(values.complement(), !nullAllowed);
}
origin: prestodb/presto

public static Range greaterThanOrEqual(Type type, Object low)
{
  return new Range(Marker.exactly(type, low), Marker.upperUnbounded(type));
}
origin: prestodb/presto

public static Range lessThan(Type type, Object high)
{
  return new Range(Marker.lowerUnbounded(type), Marker.below(type, high));
}
origin: prestodb/presto

public static Domain none(Type type)
{
  return new Domain(ValueSet.none(type), false);
}
origin: prestodb/presto

static ValueSet none(Type type)
{
  if (type.isOrderable()) {
    return SortedRangeSet.none(type);
  }
  if (type.isComparable()) {
    return EquatableValueSet.none(type);
  }
  return AllOrNoneValueSet.none(type);
}
origin: prestodb/presto

static ValueSet all(Type type)
{
  if (type.isOrderable()) {
    return SortedRangeSet.all(type);
  }
  if (type.isComparable()) {
    return EquatableValueSet.all(type);
  }
  return AllOrNoneValueSet.all(type);
}
origin: prestodb/presto

public static Range equal(Type type, Object value)
{
  return new Range(Marker.exactly(type, value), Marker.exactly(type, value));
}
origin: prestodb/presto

@Override
public boolean containsValue(Object value)
{
  return includesMarker(Marker.exactly(type, value));
}
origin: prestodb/presto

public static ValueEntry create(Type type, Object value)
{
  return new ValueEntry(type, Utils.nativeValueToBlock(type, value));
}
origin: prestodb/presto

public boolean contains(Range other)
{
  checkTypeCompatibility(other);
  return this.getLow().compareTo(other.getLow()) <= 0 &&
      this.getHigh().compareTo(other.getHigh()) >= 0;
}
origin: prestodb/presto

@Override
public SortedRangeSet union(ValueSet other)
{
  SortedRangeSet otherRangeSet = checkCompatibility(other);
  return new Builder(type)
      .addAll(this.getOrderedRanges())
      .addAll(otherRangeSet.getOrderedRanges())
      .build();
}
com.facebook.presto.spi.predicate

Most used classes

  • TupleDomain
    Defines a set of valid tuples according to the constraints on each of its constituent columns
  • Domain
    Defines the possible values of a single variable in terms of its valid scalar values and nullability
  • Range
    A Range of values across the continuous space defined by the types of the Markers
  • ValueSet
  • Marker
    A point on the continuous space defined by the specified type. Each point may be just below, exact,
  • NullableValue,
  • DiscreteValues,
  • SortedRangeSet,
  • TupleDomain$ColumnDomain,
  • ValuesProcessor,
  • EquatableValueSet,
  • AllOrNone,
  • AllOrNoneValueSet,
  • Utils,
  • EquatableValueSet$ValueEntry,
  • SortedRangeSet$Builder,
  • NullableValue$Serializable,
  • Primitives,
  • TestDomain
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now