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.
>
> In new adding case: `SELECT c collate "C", count(c) FROM pagg_tab3 GROUP BY c collate "C" HAVING count(c) > 1 ORDER
BY1;`
> According to original logic, group_by_has_partkey() will return false, it will lead to cannot do having filter in sub
table,the result is correct but the performance is poor.
> Our logic will get better performance.
>
>
> About InvalidOid collation, non-character type's collation is 0(InvalidOid) always.
>
src/test/regress/sql/partition_aggregate.sql
suppose to run with or without ICU, your new test requires ICU,
which will make some buildfarm fail?
put the test to src/test/regress/sql/collate.icu.utf8.sql
seems a little bit of strange.
also. see beginning of partition_aggregate.sql
-- Note: to ensure plan stability, it's a good idea to make the partitions of
-- any one partitioned table in this test all have different numbers of rows.
you may want to adjust the pagg_tab3 partitions rows.
some white space error.
git diff --check
src/backend/optimizer/plan/planner.c:8041: trailing whitespace.
+ * Set collation in group by
clause using COLLATE syntax,
src/backend/optimizer/plan/planner.c:8051: trailing whitespace.
+ }