public inbox for [email protected]  
help / color / mirror / Atom feed
From: Justin Pryzby <[email protected]>
To: Tomas Vondra <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: [email protected]
Subject: Re: Missing update of all_hasnulls in BRIN opclasses
Date: Fri, 6 Jan 2023 18:37:54 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

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






view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Missing update of all_hasnulls in BRIN opclasses
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox