Re: BUG #18568: BUG: Result wrong when do group by on partition table!
Tender Wang <tndrwang@gmail.com>
From: Tender Wang <tndrwang@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: 狂奔的蜗牛 <1105066510@qq.com>, pgsql-bugs <pgsql-bugs@lists.postgresql.org>, aleksander <aleksander@timescale.com>
Date: 2024-08-08T08:20:48Z
Lists: pgsql-bugs
jian he <jian.universality@gmail.com> 于2024年8月8日周四 15:51写道:
> On Wed, Aug 7, 2024 at 11:04 PM jian he <jian.universality@gmail.com>
> wrote:
> >
> > On Wed, Aug 7, 2024 at 9:08 PM 狂奔的蜗牛 <1105066510@qq.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
Commits
-
Disallow partitionwise grouping when collations don't match
- 90fe6251c816 18.0 landed
- b6484ca9535e 17.1 landed
- dd2f8ebee221 16.5 landed
- 0a620659c549 15.9 landed
- 96f9b29a3e1e 14.14 landed
- ff65f695c0d3 13.17 landed
- 46d9be5efb1a 12.21 landed