Closed patrickbkr closed 2 years ago
It seems I've forgotten to test if it's the same column on both sides (https://github.com/FCO/Red/blob/master/lib/Red/AST/Optimizer/AND.pm6#L66) (and that should be false on that case. Would you like to test it? Im away from keyboard :(
I can confirm this works. I think the same fix needs to be applied in https://github.com/FCO/Red/blob/master/lib/Red/AST/Optimizer/OR.pm6#L112
Produces the following SQL: