Re: [PATCH]: fix bug in SP-GiST box_ops

From: "Tels" <nospam-pg-abuse(at)bloodgate(dot)com>
To: "Alexander Korotkov" <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: "Emre Hasegeli" <emre(at)hasegeli(dot)com>, "Kyotaro HORIGUCHI" <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, "Nikita Glukhov" <n(dot)gluhov(at)postgrespro(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH]: fix bug in SP-GiST box_ops
Date: 2017-03-09 23:13:17
Message-ID: 627e529674a10ff24f93899a57c3a88f.squirrel@sm.webmail.pair.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

On Thu, March 9, 2017 9:04 am, Alexander Korotkov wrote:
> On Wed, Feb 1, 2017 at 2:43 PM, Emre Hasegeli <emre(at)hasegeli(dot)com> wrote:
>
>> > I think this patch is already in a good shape.
>>
>> I am sorry for introducing this bug. This fix looks good to me as well.
>
>
> I checked this patch too. And it seems good to me as well.
> Should we mark it as "ready for committer"?

I can't comment on the code, but the grammar on the comments caught my eye:

> +/* Can any range from range_box does not extend higher than this
argument? */
>
>+static bool
>+overLower2D(RangeBox *range_box, Range *query)
>+{
>+ return FPle(range_box->left.low, query->high) &&
>+ FPle(range_box->right.low, query->high);
>+}

The sentence sounds quite garbled in English. I'm not entirely sure what
it should be, but given the comment below "/* Can any range from range_box
to be higher than this argument? */" maybe something like:

/* Does any range from range_box extend to the right side of the query? */

If used, an analog wording should be used for overHigher2D's comment like:

/* Does any range from range_box extend to the left side of the query? */

Also:

/* Can any range from range_box to be higher than this argument? */

should be:

/* Can any range from range_box be higher than this argument? */

Another question: Does it make sense to add the "minimal bad example for
the '&<' case" as test case, too? After all, it should pass the test after
the patch.

Bets regards,

Tels

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-03-09 23:20:47 pgsql: Throw an error if a DATA() line contains wrong # of attributes.
Previous Message Robert Haas 2017-03-09 22:49:42 Re: Speed up Clog Access by increasing CLOG buffers