|
Update IntervalLowerTransport to allow sorted merge of RIDs after an index union, instead of a GroupBy.
For example:
Unique []
|
| projections:
|
| rid_0
|
GroupBy []
|
| | groupings:
|
| | RefBlock:
|
| | Variable [rid_0]
|
| aggregations:
|
Union []
|
| | | BindBlock:
|
| | | [rid_0]
|
| | | Source []
|
| | IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index1, interval: {[Const [3], Const [3]]}]
|
| | BindBlock:
|
| | [rid_0]
|
| | Source []
|
| IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index1, interval: {[Const [2], Const [2]]}]
|
| BindBlock:
|
| [rid_0]
|
| Source []
|
IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index1, interval: {[Const [1], Const [1]]}]
|
BindBlock:
|
[rid_0]
|
Source []
|
The RIDs into the groupby are going to be sorted, so sorted merge would be better
Instead of IndexScans -> Union -> GroupBy, we could have IndexScans -> SortedMerge -> Unique
|