File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,8 @@ extension WideQuery:VolumeLookupQuery
102
102
$0 [ let: symbol] = Output . Principal [ . master] / Volume. Vertex [ . symbol]
103
103
$0 [ let: hash] = Output . Principal [ . master] / Volume. Vertex [ . hash]
104
104
105
+ // ``namesOfLatest`` is always non-nil, so we don’t need to worry about
106
+ // degenerate index behavior.
105
107
$0 [ let: min] = Output . Principal [ . namesOfLatest] / Volume. Names [ . planes_min]
106
108
$0 [ let: max] = Output . Principal [ . namesOfLatest] / Volume. Names [ . planes_max]
107
109
}
Original file line number Diff line number Diff line change @@ -94,6 +94,13 @@ extension VolumeLookupQuery
94
94
$0 [ . replaceWith] = . init
95
95
{
96
96
$0 [ Self . names] = Mongo . Pipeline. ROOT
97
+
98
+ // ``Volume.Names`` is complex but not that large, and duplicating this
99
+ // makes the rest of the query a lot simpler.
100
+ if let names: Mongo . KeyPath = Self . namesOfLatest
101
+ {
102
+ $0 [ names] = Mongo . Pipeline. ROOT
103
+ }
97
104
}
98
105
}
99
106
You can’t perform that action at this time.
0 commit comments