数据仓库服务 GAUSSDB(DWS)-执行业务报错could not determine which collation to use for string hashing:处理方法

时间:2024-05-07 20:29:47

处理方法

当字符串表达式中collation有多个时,可手动指定COLLATE collation_name。

执行SELECT时,指定表达式ifnull(a,b)的排序规则为C或者case_insensitive。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
SELECT hashtext(ifnull(a,b) collate "C") FROM t;
 hashtext
-----------
 820977155
(1 row)

SELECT hashtext(ifnull(a,b) collate case_insensitive) FROM t;
 hashtext
-----------
 238052143
(1 row)
support.huaweicloud.com/trouble-dws/dws_09_0128.html