Re: Wrong result when enable_partitionwise_join is on if collation of PartitionKey and Column is different.

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Junwang Zhao <zhjwpku(at)gmail(dot)com>, Tender Wang <tndrwang(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Subject: Re: Wrong result when enable_partitionwise_join is on if collation of PartitionKey and Column is different.
Date: 2024-11-06 03:19:45
Message-ID: CACJufxGkn_CKadcztYxOu39MpgDAGzHq3upR5h834xKeT-2SbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

looks good to me.
I didn't find any issue.

group_by_has_partkey can even cope with:
EXPLAIN (COSTS OFF, settings)
SELECT c collate "C" collate case_insensitive collate "C", count(c)
FROM pagg_tab3 GROUP BY c collate "C" collate case_insensitive collate
"C" ORDER BY 1;

so i guess in group_by_has_partkey
if (IsA(groupexpr, RelabelType))
groupexpr = ((RelabelType *) groupexpr)->arg;
should be enough.

not need while loop.

while (IsA(groupexpr, RelabelType))
groupexpr = (Expr *) (castNode(RelabelType, groupexpr))->arg;

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message wenhui qiu 2024-11-06 03:44:46 Re: optimize the value of vacthresh and anlthresh
Previous Message David Rowley 2024-11-06 02:53:48 Re: define pg_structiszero(addr, s, r)