Interface Compensation.WithPredicateCompensation
-
- All Superinterfaces:
Compensation
,Function<ExpressionRef<RelationalExpression>,RelationalExpression>
- All Known Implementing Classes:
Compensation.ForMatch
- Enclosing interface:
- Compensation
public static interface Compensation.WithPredicateCompensation extends Compensation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.temp.Compensation
Compensation.ForMatch, Compensation.WithPredicateCompensation
-
-
Field Summary
-
Fields inherited from interface com.apple.foundationdb.record.query.plan.temp.Compensation
IMPOSSIBLE_COMPENSATION, NO_COMPENSATION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Compensation.WithPredicateCompensation
derivedWithPredicateCompensationMap(Compensation childCompensation, IdentityHashMap<QueryPredicate,QueryPredicate> predicateCompensationMap)
Method to return a new compensation of at least typeCompensation.WithPredicateCompensation
based on the current compensation object.Compensation
getChildCompensation()
Map<QueryPredicate,QueryPredicate>
getPredicateCompensationMap()
default Compensation
intersect(Compensation otherCompensation)
Specific implementation of intersecting two compensations both of typeCompensation.WithPredicateCompensation
.default Compensation
union(Compensation otherCompensation)
Specific implementation of union-ing two compensations both of typeCompensation.WithPredicateCompensation
.-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.Compensation
isNeeded
-
-
-
-
Method Detail
-
getChildCompensation
@Nonnull Compensation getChildCompensation()
-
getPredicateCompensationMap
@Nonnull Map<QueryPredicate,QueryPredicate> getPredicateCompensationMap()
-
derivedWithPredicateCompensationMap
@Nonnull Compensation.WithPredicateCompensation derivedWithPredicateCompensationMap(@Nonnull Compensation childCompensation, @Nonnull IdentityHashMap<QueryPredicate,QueryPredicate> predicateCompensationMap)
Method to return a new compensation of at least typeCompensation.WithPredicateCompensation
based on the current compensation object. This method should be implemented by implementing classes and/or their sub classes. TODO make this method protected in Java 11.- Parameters:
childCompensation
- a compensation that should be applied before the compensation being created in this methodpredicateCompensationMap
- map that mapsQueryPredicate
s of the query toQueryPredicate
s used for compensation- Returns:
- a new compensation
-
union
@Nonnull default Compensation union(@Nonnull Compensation otherCompensation)
Specific implementation of union-ing two compensations both of typeCompensation.WithPredicateCompensation
. This implementation delegates to its super method ifotherCompensation
is not of typeCompensation.WithPredicateCompensation
. If it is, it creates a new compensation of typeCompensation.WithPredicateCompensation
that contains the mappings of both this compensation andotherCompensation
.- Specified by:
union
in interfaceCompensation
- Parameters:
otherCompensation
- other compensation to union this compensation with- Returns:
- a new compensation object representing the logical union between
this
andotherCompensation
-
intersect
@Nonnull default Compensation intersect(@Nonnull Compensation otherCompensation)
Specific implementation of intersecting two compensations both of typeCompensation.WithPredicateCompensation
. This implementation delegates to its super method ifotherCompensation
is not of typeCompensation.WithPredicateCompensation
. If it is, it creates a new compensation of typeCompensation.WithPredicateCompensation
that contains only the mappings that are contained in both this compensation andotherCompensation
.- Specified by:
intersect
in interfaceCompensation
- Parameters:
otherCompensation
- other compensation to intersect this compensation with- Returns:
- a new compensation object representing the logical intersection between
this
andotherCompensation
-
-