On Sun, 6 Dec 2020 at 04:10, Andy Fan <zhihui.fan1...@gmail.com> wrote: > For anyone who is interested with these patchsets, here is my plan about this > now. 1). I will try EquivalenceClass rather than Expr in UniqueKey and add > opfamily > if needed.
I agree that we should be storing them in EquivalenceClasses. Apart from what was mentioned already it also allow the optimisation to work in cases like: create table t (a int not null unique, b int); select distinct b from t where a = b; David