Hi Ayush
> if (nonnullable_quals != NIL && IsA(expr, Var) &&
> > ((Var *) expr)->varlevelsup == 0)
>
I think the additional varlevelsup == 0 check is correct.
find_nonnullable_vars() only records level-zero Vars, and the
multibitmapset identifies them using only varno and varattno.
Thanks