fdb-record-layer icon indicating copy to clipboard operation
fdb-record-layer copied to clipboard

`ParameterComparison`s should declare their `correlatedTo()` properly

Open normen662 opened this issue 3 years ago • 0 comments

Currently Comparison does not implement Correlated<S>. That means that even ParameterComparison is not considered to be correlated to anything. There is usage for a ParameterComparison which can be a correlation (instead of a parameter marker of a rank artifact), however, no code currently factors in that the argument the comparison uses is in itself something that gets computed by some outer. This becomes a real problem for interesting rewrites such as IN-to-UNION and IN-to-JOIN as both needed matching to be tricked into treating the correlation as a constant. As part of further refinement of those the first logical step here is to correct this oversight and have Comparison implement Correlated<S>. That will also allow to rebase a Comparison which will come in handy going forward as well.

normen662 avatar Nov 12 '21 21:11 normen662