D
Size: a a a
D
H
M
AK
ИТ
D
D
D
D
CREATE TABLE table_test (
`field` LowCardinality(String),
`fieldMap1` SimpleAggregateFunction(sumMap, Tuple(Array(String), Array(Int64))),
`fieldMap2` SimpleAggregateFunction(sumMap, Tuple(Array(String), Array(Int64))),
`fieldMap3` SimpleAggregateFunction(sumMap, Tuple(Array(String), Array(Int64))),
`total` SimpleAggregateFunction(sum, Int64)
) ENGINE = AggregatingMergeTree()
ORDER BY
field SETTINGS index_granularity = 4096
D
select sumMap(arrayMap(a->coalesce(a,-999999),x), y) from (
select [2,3,null,2,3] AS x, [1,1,2,3,4] as y )
D
select sumMap(arrayMap(a->coalesce(a,-999999),x), y) from (
select [2,3,null,2,3] AS x, [1,1,2,3,4] as y )
D
D
CREATE TABLE table_test (
`field` LowCardinality(String),
`fieldMap1` SimpleAggregateFunction(sumMap, Tuple(Array(String), Array(Int64))),
`fieldMap2` SimpleAggregateFunction(sumMap, Tuple(Array(String), Array(Int64))),
`fieldMap3` SimpleAggregateFunction(sumMap, Tuple(Array(String), Array(Int64))),
`total` SimpleAggregateFunction(sum, Int64)
) ENGINE = AggregatingMergeTree()
ORDER BY
field SETTINGS index_granularity = 4096
D
D
D
select arrayDistinct(flatten(groupArray(x))) as keys, sumMap(x, y) from (
select [1,3,3] AS x, [1,-1,1] as y UNION ALL
select [1,4,5] AS x, [1,1,-1] as y)
D
select arrayDistinct(flatten(groupArray(x))) as keys, sumMap(x, y) from (
select [1,3,3] AS x, [1,-1,1] as y UNION ALL
select [1,4,5] AS x, [1,1,-1] as y)
ВЕ
DC
ВЕ