Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
eb22d7ff
提交
eb22d7ff
authored
9月 15, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix unstable tests in PageStore mode
上级
356414ab
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
47 行增加
和
47 行删除
+47
-47
array-agg.sql
...est/org/h2/test/scripts/functions/aggregate/array-agg.sql
+47
-47
没有找到文件。
h2/src/test/org/h2/test/scripts/functions/aggregate/array-agg.sql
浏览文件 @
eb22d7ff
...
...
@@ -77,45 +77,45 @@ INSERT INTO TEST VALUES (1, 'a'), (2, 'a'), (3, 'b'), (4, 'c'), (5, 'c'), (6, 'c
SELECT
ARRAY_AGG
(
ID
),
NAME
FROM
TEST
;
>
exception
MUST_GROUP_BY_COLUMN_1
SELECT
ARRAY_AGG
(
ID
),
NAME
FROM
TEST
GROUP
BY
NAME
;
>
ARRAY_AGG
(
ID
)
NAME
>
------------- ----
>
(
1
,
2
)
a
>
(
3
)
b
>
(
4
,
5
,
6
)
c
SELECT
ARRAY_AGG
(
ID
ORDER
BY
ID
),
NAME
FROM
TEST
GROUP
BY
NAME
;
>
ARRAY_AGG
(
ID
ORDER
BY
ID
)
NAME
>
-------------
------------
----
>
(
1
,
2
)
a
>
(
3
)
b
>
(
4
,
5
,
6
)
c
>
rows
:
3
SELECT
ARRAY_AGG
(
ID
)
OVER
(),
NAME
FROM
TEST
;
>
ARRAY_AGG
(
ID
)
OVER
()
NAME
>
--------------------- ----
>
(
1
,
2
,
3
,
4
,
5
,
6
)
a
>
(
1
,
2
,
3
,
4
,
5
,
6
)
a
>
(
1
,
2
,
3
,
4
,
5
,
6
)
b
>
(
1
,
2
,
3
,
4
,
5
,
6
)
c
>
(
1
,
2
,
3
,
4
,
5
,
6
)
c
>
(
1
,
2
,
3
,
4
,
5
,
6
)
c
SELECT
ARRAY_AGG
(
ID
ORDER
BY
ID
)
OVER
(),
NAME
FROM
TEST
;
>
ARRAY_AGG
(
ID
ORDER
BY
ID
)
OVER
()
NAME
>
---------------------
------------
----
>
(
1
,
2
,
3
,
4
,
5
,
6
)
a
>
(
1
,
2
,
3
,
4
,
5
,
6
)
a
>
(
1
,
2
,
3
,
4
,
5
,
6
)
b
>
(
1
,
2
,
3
,
4
,
5
,
6
)
c
>
(
1
,
2
,
3
,
4
,
5
,
6
)
c
>
(
1
,
2
,
3
,
4
,
5
,
6
)
c
>
rows
:
6
SELECT
ARRAY_AGG
(
ID
)
OVER
(
PARTITION
BY
NAME
),
NAME
FROM
TEST
;
>
ARRAY_AGG
(
ID
)
OVER
(
PARTITION
BY
NAME
)
NAME
>
-------------------------------------- ----
>
(
1
,
2
)
a
>
(
1
,
2
)
a
>
(
3
)
b
>
(
4
,
5
,
6
)
c
>
(
4
,
5
,
6
)
c
>
(
4
,
5
,
6
)
c
SELECT
ARRAY_AGG
(
ID
ORDER
BY
ID
)
OVER
(
PARTITION
BY
NAME
),
NAME
FROM
TEST
;
>
ARRAY_AGG
(
ID
ORDER
BY
ID
)
OVER
(
PARTITION
BY
NAME
)
NAME
>
--------------------------------------
------------
----
>
(
1
,
2
)
a
>
(
1
,
2
)
a
>
(
3
)
b
>
(
4
,
5
,
6
)
c
>
(
4
,
5
,
6
)
c
>
(
4
,
5
,
6
)
c
>
rows
:
6
SELECT
ARRAY_AGG
(
ID
)
FILTER
(
WHERE
ID
<
3
OR
ID
>
4
)
OVER
(
PARTITION
BY
NAME
),
NAME
FROM
TEST
ORDER
BY
NAME
;
>
ARRAY_AGG
(
ID
)
FILTER
(
WHERE
((
ID
<
3
)
OR
(
ID
>
4
)))
OVER
(
PARTITION
BY
NAME
)
NAME
>
---------------------------------------------------------------------------- ----
>
(
1
,
2
)
a
>
(
1
,
2
)
a
>
null
b
>
(
5
,
6
)
c
>
(
5
,
6
)
c
>
(
5
,
6
)
c
SELECT
ARRAY_AGG
(
ID
ORDER
BY
ID
)
FILTER
(
WHERE
ID
<
3
OR
ID
>
4
)
OVER
(
PARTITION
BY
NAME
),
NAME
FROM
TEST
ORDER
BY
NAME
;
>
ARRAY_AGG
(
ID
ORDER
BY
ID
)
FILTER
(
WHERE
((
ID
<
3
)
OR
(
ID
>
4
)))
OVER
(
PARTITION
BY
NAME
)
NAME
>
----------------------------------------------------------------------------
------------
----
>
(
1
,
2
)
a
>
(
1
,
2
)
a
>
null
b
>
(
5
,
6
)
c
>
(
5
,
6
)
c
>
(
5
,
6
)
c
>
rows
(
ordered
):
6
SELECT
ARRAY_AGG
(
SUM
(
ID
))
OVER
()
FROM
TEST
;
...
...
@@ -124,9 +124,9 @@ SELECT ARRAY_AGG(SUM(ID)) OVER () FROM TEST;
>
(
21
)
>
rows
:
1
SELECT
ARRAY_AGG
(
ID
)
OVER
()
FROM
TEST
GROUP
BY
ID
;
>
ARRAY_AGG
(
ID
)
OVER
()
>
---------------------
SELECT
ARRAY_AGG
(
ID
ORDER
BY
ID
)
OVER
()
FROM
TEST
GROUP
BY
ID
;
>
ARRAY_AGG
(
ID
ORDER
BY
ID
)
OVER
()
>
---------------------
------------
>
(
1
,
2
,
3
,
4
,
5
,
6
)
>
(
1
,
2
,
3
,
4
,
5
,
6
)
>
(
1
,
2
,
3
,
4
,
5
,
6
)
...
...
@@ -143,19 +143,19 @@ SELECT ARRAY_AGG(NAME) OVER(PARTITION BY NAME) FROM TEST GROUP BY NAME;
>
(
c
)
>
rows
:
3
SELECT
ARRAY_AGG
(
ARRAY_AGG
(
ID
))
OVER
(
PARTITION
BY
NAME
),
NAME
FROM
TEST
GROUP
BY
NAME
;
>
ARRAY_AGG
(
ARRAY_AGG
(
ID
))
OVER
(
PARTITION
BY
NAME
)
NAME
>
------------------------------------------------- ----
>
((
1
,
2
))
a
>
((
3
))
b
>
((
4
,
5
,
6
))
c
SELECT
ARRAY_AGG
(
ARRAY_AGG
(
ID
ORDER
BY
ID
))
OVER
(
PARTITION
BY
NAME
),
NAME
FROM
TEST
GROUP
BY
NAME
;
>
ARRAY_AGG
(
ARRAY_AGG
(
ID
ORDER
BY
ID
))
OVER
(
PARTITION
BY
NAME
)
NAME
>
-------------------------------------------------
------------
----
>
((
1
,
2
))
a
>
((
3
))
b
>
((
4
,
5
,
6
))
c
>
rows
:
3
SELECT
ARRAY_AGG
(
ARRAY_AGG
(
ID
))
OVER
(
PARTITION
BY
NAME
),
NAME
FROM
TEST
GROUP
BY
NAME
OFFSET
1
ROW
;
>
ARRAY_AGG
(
ARRAY_AGG
(
ID
))
OVER
(
PARTITION
BY
NAME
)
NAME
>
------------------------------------------------- ----
>
((
3
))
b
>
((
4
,
5
,
6
))
c
SELECT
ARRAY_AGG
(
ARRAY_AGG
(
ID
ORDER
BY
ID
))
OVER
(
PARTITION
BY
NAME
),
NAME
FROM
TEST
GROUP
BY
NAME
OFFSET
1
ROW
;
>
ARRAY_AGG
(
ARRAY_AGG
(
ID
ORDER
BY
ID
))
OVER
(
PARTITION
BY
NAME
)
NAME
>
-------------------------------------------------
------------
----
>
((
3
))
b
>
((
4
,
5
,
6
))
c
>
rows
:
2
DROP
TABLE
TEST
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论