selector,
rulesContext.getPipelineConfiguration().getIndexScanLookaheadQuantum());
stream.rowType = indexRowType;
}
else {
ColumnRanges range = indexScan.getConditionRange();
// Non-single-point ranges are ordered by the ranges
// themselves as part of merging segments, so that index
// column is an ordering column.
// Single-point ranges have only one value for the range column,
// so they can order by the following columns if we're
// willing to do the more expensive ordered union.
// Determine whether anything is taking advantage of this:
// * Index is being intersected.
// * Index is effective for query ordering.
// ** See also special case in AggregateSplitter.directIndexMinMax().
boolean unionOrdered = false, unionOrderedAll = false;
if (range.isAllSingle()) {
if (forIntersection != IntersectionMode.NONE) {
unionOrdered = true;
if (forIntersection == IntersectionMode.OUTPUT) {
unionOrderedAll = true;
}
}
else if (indexScan.getOrderEffectiveness() != IndexScan.OrderEffectiveness.NONE) {
unionOrderedAll = unionOrdered = true;
}
}
for (RangeSegment rangeSegment : range.getSegments()) {
Operator scan = API.indexScan_Default(indexRowType,
assembleIndexKeyRange(indexScan, null, rangeSegment),
assembleIndexOrdering(indexScan, indexRowType),
selector,
rulesContext.getPipelineConfiguration().getIndexScanLookaheadQuantum());