On Fri, Dec 30, 2022 at 01:18:36AM +0100, Tomas Vondra wrote:
> + * Does the range already has NULL values? Either of the flags can
should say: "already have NULL values"
> + * If we had NULLS, and the opclass didn't set allnulls=true, set
> + * the hasnulls so that we know there are NULL values.
You could remove "the" before "hasnulls".
Or say "clear hasnulls so that.."
> @@ -585,6 +587,13 @@ brin_deform_tuple(BrinDesc *brdesc, BrinTuple *tuple, BrinMemTuple *dMemtuple)
> {
> int i;
>
> + /*
> + * Make sure to overwrite the hasnulls flag, because it was initialized
> + * to true by brin_memtuple_initialize and we don't want to skip it if
> + * allnulls.
Does "if allnulls" mean "if allnulls is true" ?
It's a bit unclear.
> + */
> + dtup->bt_columns[keyno].bv_hasnulls = hasnulls[keyno];
> +
> if (allnulls[keyno])
> {
> valueno += brdesc->bd_info[keyno]->oi_nstored;
--
Justin