S
проверьте в clickhouse-client
Size: a a a
S
AK
E
DK
initializeAggregation
передать функцию groupArrayInsertAt
?DK
WITH initializeAggregation('groupArrayInsertAtState(0,10)(1,2)', x) as ga_x_state
SELECT
id,
x,
runningAccumulate(ga_x_state) as gx
FROM
vf.t;
DK
DK
DB::Exception: Syntax error (parameters of aggregate function in function initializeAggregation): failed at position 5 (')'): )(1,2. Unmatched parentheses: )
S
AK
AK
AK
ИМ
ALTER TABLE [db].name ADD INDEX name expression TYPE type GRANULARITY value [AFTER name], но мне не очень понятно как этим пользоваться. Можно на примере каком нибудь? Например хочу на колонку
insert_time DEFAULT now()навесить индекс. Что нужно написать?
DM
ALTER TABLE [db].name ADD INDEX name expression TYPE type GRANULARITY value [AFTER name], но мне не очень понятно как этим пользоваться. Можно на примере каком нибудь? Например хочу на колонку
insert_time DEFAULT now()навесить индекс. Что нужно написать?
ALTER TABLE <t> ADD INDEX idx_insert_time insert_time TYPE minmax GRANULARITY 4
AK
ИМ
ALTER TABLE <t> ADD INDEX idx_insert_time insert_time TYPE minmax GRANULARITY 4
AK
DK
WITH initializeAggregation('groupArrayInsertAtState(0,10)(1,2)', x) as ga_x_state
SELECT
id,
x,
runningAccumulate(ga_x_state) as gx
FROM
vf.t;
WITH initializeAggregation('groupArrayInsertAtState(0,20)', x, toUInt32(id)) as ga_x_state
SELECT
id,
x,
least(toUInt32(x), 0) as y,
runningAccumulate(ga_x_state) as gx
FROM
vf.t
ORDER BY id
DM
ИМ
DM