Re: BUG #19826: corr()/regr_r2() of constant input: NULL serially, 1 with partial aggregation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Venu K <venu2805k(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19826: corr()/regr_r2() of constant input: NULL serially, 1 with partial aggregation
Date: 2026-11-12 17:22:20
Message-ID: 44951.1794504140@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Venu K <venu2805k(at)gmail(dot)com> writes:
> On Thu, Nov 12, 2026 at 1:53 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Yeah, it seems clear that that test case is just made-up data,

> The first six entries aren't made up: they are the transition states
> for the regr_test rows with x IN (10,20,30) and x IN (80,100), which
> the queries just above print. Only the commonX/commonY entries (7,8
> and 7,9) don't fit those rows, which have distinct X and Y values.

Ah. Now that I think about it, the bogus commonX/commonY entries are
probably my fault: they came in with 649828769, and I was not aware
that the other columns matched some real state, so I just made them
test both the NaN and non-NaN code paths.

> v4 attached: your v3 plus those test changes and a paragraph about
> them in the commit message. make check passes on master (b0496e3)
> with assertions enabled.

v4 seems good, pushed. Thanks for the report and patch!

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-11-12 17:33:28 Re: BUG #19885: pg_input_is_valid(tsquery) throws stack depth error instead of returning false
Previous Message Tom Lane 2026-11-12 16:48:49 Re: BUG #19816: PL/Python SD dictionary is split by input collation in 19rc1