--
You received this message because you are subscribed to the Google Groups "ClickHouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clickhouse+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clickhouse/dbc72cb7-79aa-459a-84ff-ee76cb7f489f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MT из MT работает, если второй MT делать через subquery, в котором названия колонок будут заменены нормальными алиасами. Это чисто проблема описания языка, не функционала.
16 марта 2017 г., 16:09 пользователь Юрий Думп <u.d...@gmail.com> написал:
Здравствуйте.Есть таблица типа MergeTree A (dt Date, id_user UInt32) Engine = MergeTree(dt (dt, id_user), 8194)Есть мат. представление B (dt Date, user_agg AggregateFunction(uniq, UInt32) ) Engine = AggregatingMergeTree(dt, dt, 8194 ) as select dt, uniqState(id_user) from A group by dtТребуется создать мат. представление C которое будет брать данные из B, но группировать их по неделямЯ попробовал реализовать его следующим образом C (dt Date, user_agg AggregateFunction(uniq, UInt32) ) Engine = AggregatingMergeTree(dt, dt, 8194 ) as select toMonday(dt) dt, uniqMergeState(user_agg) user_agg from `.inner.A` group by dtТакое представление создается, но при попытке выполнить в него вставку ( insert into `.inner.C` select toMonday(dt) dt, uniqMergeState(user_agg) user_agg from `.inner.A` group by dt) получаю ошибкуCode: 53, e.displayText() = DB::Exception: Type mismatch for column user_agg. Column has type AggregateFunction(uniq, UInt32), got type AggregateFunction(uniqMerge, AggregateFunction(uniq, UInt32)), e.what() = DB::ExceptionЧто делать?
--
You received this message because you are subscribed to the Google Groups "ClickHouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clickhouse+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clickhouse/dbc72cb7-79aa-459a-84ff-ee76cb7f489f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Mikhail U. Petrov.
To unsubscribe from this group and stop receiving emails from it, send an email to clickhouse+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clickhouse/86f28ac9-8949-455e-a1d7-bf1b02f9cc6b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clickhouse/86f28ac9-8949-455e-a1d7-bf1b02f9cc6b%40googlegroups.com.
--Mikhail U. Petrov.