public static SortedAccessStrategy make(boolean isNWOnTrigger, int lookupStream, int numStreams, SubordPropRangeKey streamRangeKey) {
QueryGraphValueEntryRange rangeKeyPair = streamRangeKey.getRangeInfo();
if (rangeKeyPair.getType().isRange()) {
QueryGraphValueEntryRangeIn rangeIn = (QueryGraphValueEntryRangeIn) rangeKeyPair;
ExprEvaluator startExpr = rangeIn.getExprStart().getExprEvaluator();
ExprEvaluator endExpr = rangeIn.getExprEnd().getExprEvaluator();
boolean includeStart = rangeKeyPair.getType().isIncludeStart();
boolean includeEnd = rangeKeyPair.getType().isIncludeEnd();
if (!rangeKeyPair.getType().isRangeInverted()) {
return new SortedAccessStrategyRange(isNWOnTrigger, lookupStream, numStreams, startExpr, includeStart, endExpr, includeEnd, rangeIn.isAllowRangeReversal());
}
else {
return new SortedAccessStrategyRangeInverted(isNWOnTrigger, lookupStream, numStreams, startExpr, includeStart, endExpr, includeEnd);
}
}