Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need support aggregate function: groupUniqArrayArray #1052

Open
yandd opened this issue Aug 29, 2022 · 0 comments
Open

need support aggregate function: groupUniqArrayArray #1052

yandd opened this issue Aug 29, 2022 · 0 comments
Labels

Comments

@yandd
Copy link

yandd commented Aug 29, 2022

DDL:

CREATE MATERIALIZED VIEW log.slog_columns
(
    `_namespace` LowCardinality(String),
    `app` LowCardinality(String),
    `_string_columns` SimpleAggregateFunction(groupUniqArrayArray, Array(String)),
    `_number_columns` SimpleAggregateFunction(groupUniqArrayArray, Array(String)),
    `_date` Date
)
ENGINE = ReplicatedAggregatingMergeTree('/clickhouse/tables/{single_shard_cluster}/{single_shard}/log/.inner_id.17f49fce-b895-461c-97f4-9fceb895e61c', '{replica}')
PARTITION BY toYYYYMMDD(_date)
ORDER BY (_namespace, app, _date)
TTL _date + toIntervalDay(15)
SETTINGS index_granularity = 8192 AS
SELECT
    _namespace,
    app,
    groupUniqArrayArray(string.names) AS _string_columns,
    groupUniqArrayArray(number.names) AS _number_columns,
    toDate(_timestamp) AS _date
FROM log.slog
GROUP BY
    _namespace,
    app,
    _date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants