fdb-record-layer
fdb-record-layer copied to clipboard
Cascades `TransformPartialMatch` will sometimes do repetitive work
For a given partial match between a query expression and a candidate expression, the TransformPartialMatch
task attempts to establish new partial match between the same query expression and the referencing expressions of the candidate expression, effectively "absorbing" it.
When a newer partial match is successfully created, the same TransformPartialMatch
task is scheduled again for that newer partial match to examine it and progressively absorb further candidate expression bottom up if possible.
The problem is, to detect the referencing expression(s) of the candidate expression in a partial match, the TransformPartialMatch
task calls into the query expression to retrieve all the referencing expressions of corresponding candidate expressions for each partial match again, this will return the referencing expression of the old partial match and the one for the newly established partial match (which is currently examined).
It would probably be more efficient if we can avoid generating the old partial match candidate-expression's referencing expression(s).