Re: BUG #18568: BUG: Result wrong when do group by on partition table!

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: 狂奔的蜗牛 <1105066510(at)qq(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>, aleksander <aleksander(at)timescale(dot)com>
Subject: Re: BUG #18568: BUG: Result wrong when do group by on partition table!
Date: 2024-08-08 08:20:48
Message-ID: CAHewXNnxrknh4ieTT78qOqHCMEt=ZBTi2BqJZPNYy8kkM70otg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

jian he <jian(dot)universality(at)gmail(dot)com> 于2024年8月8日周四 15:51写道:

> On Wed, Aug 7, 2024 at 11:04 PM jian he <jian(dot)universality(at)gmail(dot)com>
> wrote:
> >
> > On Wed, Aug 7, 2024 at 9:08 PM 狂奔的蜗牛 <1105066510(at)qq(dot)com> wrote:
> > >
> > > I readd RelabelType to branch in v5 patch, and add case to cover the
> code.
> > >
>
>
> I did some minor adjustments in group_by_has_partkey, also refactored
> the comment.
>

The logic in patch I think no problem. But I don't like the code style.

if (IsA(groupexpr, RelabelType))
groupexpr = ((RelabelType *) groupexpr)->arg;
if (expr(groupexpr, partexr) && partcoll == groupcoll)
{
...
}

This looks more compact.

By the way, I think we'd better to include test cases together in your
patch, then others can continue
to work based on your patch not need to go back to add the test cases.

--
Tender Wang

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Aleš Zelený 2024-08-08 08:31:38 Re: BUG #18573: Analyze command consumes several GB of memory - more than analyzed table size
Previous Message Georgy Shelkovy 2024-08-08 07:57:12 Re: BUG #18575: Sometimes pg_rewind mistakenly assumes that nothing needs to be done.