数据仓库服务 GaussDB(DWS)-使用string_agg函数查询执行结果不稳定:原因分析

时间:2025-02-12 15:02:21

原因分析

某业务场景中的SQL语句中使用了string_agg函数,语句逻辑如下:

执行如下SQL语句:

1234
select count(*) from(select deptno, string_agg(ename, ',') from employee group by deptno) t1 ,(select deptno, string_agg(ename, ',') from employee group by deptno) t2where t1.string_agg = t2.string_agg;
support.huaweicloud.com/trouble-dws/dws_09_0088.html