diff --git a/tests/queries/0_stateless/03122_analyzer_collate_in_window_function.reference b/tests/queries/0_stateless/03122_analyzer_collate_in_window_function.reference new file mode 100644 index 00000000000..14933280e02 --- /dev/null +++ b/tests/queries/0_stateless/03122_analyzer_collate_in_window_function.reference @@ -0,0 +1,3 @@ +北京 ['北京'] +上海 ['北京','上海'] +西安 ['北京','上海','西安'] diff --git a/tests/queries/0_stateless/03122_analyzer_collate_in_window_function.sql b/tests/queries/0_stateless/03122_analyzer_collate_in_window_function.sql new file mode 100644 index 00000000000..71ac905838d --- /dev/null +++ b/tests/queries/0_stateless/03122_analyzer_collate_in_window_function.sql @@ -0,0 +1,6 @@ +-- https://github.com/ClickHouse/ClickHouse/issues/44039 +create table test_window_collate(c1 String, c2 String) engine=MergeTree order by c1; +insert into test_window_collate values('1', '上海'); +insert into test_window_collate values('1', '北京'); +insert into test_window_collate values('1', '西安'); +select c2, groupArray(c2) over (partition by c1 order by c2 asc collate 'zh_Hans_CN') as res from test_window_collate order by c2 asc collate 'zh_Hans_CN';