Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
c2b0c07b
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c2b0c07b
编写于
2月 26, 2019
作者:
C
chertus
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test for issue-3783 (deciaml groupArray crash)
上级
2c8535e2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
73 addition
and
0 deletion
+73
-0
dbms/tests/queries/0_stateless/00910_decimal_group_array_crash_3783.reference
..._stateless/00910_decimal_group_array_crash_3783.reference
+9
-0
dbms/tests/queries/0_stateless/00910_decimal_group_array_crash_3783.sql
...ries/0_stateless/00910_decimal_group_array_crash_3783.sql
+64
-0
未找到文件。
dbms/tests/queries/0_stateless/00910_decimal_group_array_crash_3783.reference
0 → 100644
浏览文件 @
c2b0c07b
[1.00]
[1.00000]
[1.0000000000]
[499500.00]
[499500.00000]
[499500.0000000000]
1545081300 [('ed87e57c-9331-462a-80b4-9f0c005e88c8',0.4400)]
4341757 5657967 2018-11-01 16:47:46 txt 321.380000000000 315.080000000000 0.000000000000 2018-11-02 00:00:00
4360430 5681495 2018-11-02 09:00:07 txt 274.350000000000 268.970000000000 0.000000000000 2018-11-02 00:00:00
dbms/tests/queries/0_stateless/00910_decimal_group_array_crash_3783.sql
0 → 100644
浏览文件 @
c2b0c07b
USE
test
;
select
groupArray
(
s
)
from
(
select
sum
(
n
)
s
from
(
select
toDecimal32
(
1
,
2
)
as
n
));
select
groupArray
(
s
)
from
(
select
sum
(
n
)
s
from
(
select
toDecimal64
(
1
,
5
)
as
n
));
select
groupArray
(
s
)
from
(
select
sum
(
n
)
s
from
(
select
toDecimal128
(
1
,
10
)
as
n
));
select
groupArray
(
s
)
from
(
select
sum
(
n
)
s
from
(
select
toDecimal32
(
number
,
2
)
as
n
from
numbers
(
1000
)));
select
groupArray
(
s
)
from
(
select
sum
(
n
)
s
from
(
select
toDecimal64
(
number
,
5
)
as
n
from
numbers
(
1000
)));
select
groupArray
(
s
)
from
(
select
sum
(
n
)
s
from
(
select
toDecimal128
(
number
,
10
)
as
n
from
numbers
(
1000
)));
DROP
TABLE
IF
EXISTS
sensor_value
;
CREATE
TABLE
sensor_value
(
received_at
DateTime
,
device_id
UUID
,
sensor_id
UUID
,
value
Nullable
(
Decimal
(
18
,
4
)),
low_warning
Nullable
(
Decimal
(
18
,
4
)),
low_critical
Nullable
(
Decimal
(
18
,
4
)),
high_warning
Nullable
(
Decimal
(
18
,
4
)),
high_critical
Nullable
(
Decimal
(
18
,
4
))
)
ENGINE
=
MergeTree
PARTITION
BY
toDate
(
received_at
)
ORDER
BY
(
device_id
,
sensor_id
);
INSERT
INTO
sensor_value
(
received_at
,
device_id
,
sensor_id
,
value
,
low_warning
,
low_critical
,
high_warning
,
high_critical
)
VALUES
(
'2018-12-18 00:16:07'
,
'a4d92414-09aa-4dbd-80b2-124ddaacf333'
,
'ed87e57c-9331-462a-80b4-9f0c005e88c8'
,
'0.4400'
,
'-10000000.0000'
,
'-10000000.0000'
,
'10000000.0000'
,
'10000000.0000'
);
SELECT
`time`
,
groupArray
((
sensor_id
,
volume
))
AS
groupArr
FROM
(
SELECT
(
intDiv
(
toUInt32
(
received_at
),
900
)
*
900
)
AS
`time`
,
sensor_id
,
avg
(
value
)
AS
volume
FROM
sensor_value
WHERE
received_at
BETWEEN
'2018-12-12 00:00:00'
AND
'2018-12-30 00:00:00'
GROUP
BY
`time`
,
sensor_id
ORDER
BY
`time`
)
GROUP
BY
`time`
;
DROP
TABLE
sensor_value
;
select
s
.
a
,
s
.
b
,
max
(
s
.
dt1
)
dt1
,
s
.
c
,
s
.
d
,
s
.
f
,
s
.
i
,
max
(
s
.
dt2
)
dt2
from
(
select
toUInt64
(
4360430
)
a
,
toUInt64
(
5681495
)
b
,
toDateTime
(
'2018-11-01 10:44:58'
)
dt1
,
'txt'
c
,
toDecimal128
(
'274.350000000000'
,
12
)
d
,
toDecimal128
(
268
.
970000000000
,
12
)
f
,
toDecimal128
(
0
.
000000000000
,
12
)
i
,
toDateTime
(
'2018-11-02 00:00:00'
)
dt2
union
all
select
toUInt64
(
4341757
)
a
,
toUInt64
(
5657967
)
b
,
toDateTime
(
'2018-11-01 16:47:46'
)
dt1
,
'txt'
c
,
toDecimal128
(
'321.380000000000'
,
12
)
d
,
toDecimal128
(
315
.
080000000000
,
12
)
f
,
toDecimal128
(
0
.
000000000000
,
12
)
i
,
toDateTime
(
'2018-11-02 00:00:00'
)
dt2
union
all
select
toUInt64
(
4360430
)
a
,
toUInt64
(
5681495
)
b
,
toDateTime
(
'2018-11-02 09:00:07'
)
dt1
,
'txt'
c
,
toDecimal128
(
'274.350000000000'
,
12
)
d
,
toDecimal128
(
268
.
970000000000
,
12
)
f
,
toDecimal128
(
0
.
000000000000
,
12
)
i
,
toDateTime
(
'2018-11-02 00:00:00'
)
dt2
)
s
group
by
s
.
a
,
s
.
b
,
s
.
c
,
s
.
d
,
s
.
f
,
s
.
i
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录