Package io.trino.spi.connector
Class Constraint
java.lang.Object
io.trino.spi.connector.Constraint
-
Constructor Summary
ConstructorsConstructorDescriptionConstraint(TupleDomain<ColumnHandle> summary) Constraint(TupleDomain<ColumnHandle> summary, ConnectorExpression expression, Map<String, ColumnHandle> assignments) Constraint(TupleDomain<ColumnHandle> summary, ConnectorExpression expression, Map<String, ColumnHandle> assignments, Predicate<Map<ColumnHandle, NullableValue>> predicate, Set<ColumnHandle> predicateColumns) Constraint(TupleDomain<ColumnHandle> summary, Predicate<Map<ColumnHandle, NullableValue>> predicate, Set<ColumnHandle> predicateColumns) -
Method Summary
Modifier and TypeMethodDescriptionstatic Constraintstatic ConstraintSet of columns thepredicate()result depends on.A predicate that can be used to filter data.toString()
-
Constructor Details
-
Constraint
-
Constraint
public Constraint(TupleDomain<ColumnHandle> summary, Predicate<Map<ColumnHandle, NullableValue>> predicate, Set<ColumnHandle> predicateColumns) -
Constraint
public Constraint(TupleDomain<ColumnHandle> summary, ConnectorExpression expression, Map<String, ColumnHandle> assignments) -
Constraint
public Constraint(TupleDomain<ColumnHandle> summary, ConnectorExpression expression, Map<String, ColumnHandle> assignments, Predicate<Map<ColumnHandle, NullableValue>> predicate, Set<ColumnHandle> predicateColumns)
-
-
Method Details
-
alwaysTrue
-
alwaysFalse
-
getSummary
- Returns:
- a predicate which is equivalent to, or looser than
predicate(if present), and should be AND-ed with,getExpression().
-
getExpression
- Returns:
- an expression predicate which is different from, and should be AND-ed with,
getSummary()orpredicate(if present).
-
getAssignments
- Returns:
- mappings from variable names to table column handles
It is guaranteed that all the required mappings for
getExpression()will be provided but not necessarily *all* the column handles of the table
-
predicate
A predicate that can be used to filter data. If present, it is equivalent to, or stricter than,getSummary()and different from, and should be AND-ed with,getExpression().For Constraint provided in
ConnectorMetadata.applyFilter(ConnectorSession, ConnectorTableHandle, Constraint), the predicate cannot be held on to after the call returns.- See Also:
-
getPredicateColumns
Set of columns thepredicate()result depends on. It's present if and only ifpredicate()is present. -
toString
-