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

Fields of AggregateFunction type omitted from preview and erroring in Query Editor #197

Open
wickyvinn opened this issue Oct 4, 2023 · 2 comments
Labels
blocked-by-jdbc enhancement New feature or request

Comments

@wickyvinn
Copy link

wickyvinn commented Oct 4, 2023

Describe the bug

I have a table that is ReplicatedAggregatingMergeTree, and several fields that have the type AggregateFunction(avg, Float64). When querying this table via the Clickhouse CLI, I'm able to view at least the hash of such functions, for example:

SELECT
    timestamp,
    secure_connection_start_ms
FROM p2p_http_all_aggr_5m_v1_dist
LIMIT 10
┌───────────timestamp─┬─secure_connection_start_ms─┐
│ 2023-09-28 08:00:00 │ @l@                        │
│ 2023-09-28 08:00:00 │ @p@                        │
│ 2023-09-28 08:00:00 │ ?u@                         │
│ 2023-09-28 08:00:00 │ ?v@                         │
│ 2023-09-28 08:00:00 │ v@                         │
│ 2023-09-28 08:00:00 │ ?w@                         │
│ 2023-09-28 08:00:00 │ l@                         │
│ 2023-09-28 08:00:00 │ l?@                         │
│ 2023-09-28 08:00:00 │  l@                        │
│ 2023-09-28 08:00:00 │  j@                        │
└─────────────────────┴────────────────────────────┘

And when interacting in with the Metabase preview, those AggregatedFunction fields are omitted. Furthermore, when querying in the Metabase query editor, I get a groupMap error of “Only groupMap is supported at this point”

Is this intended behavior or should metabase be able to show the AggregatedFunction hashes for data exploration? If intended behavior, the error should be clearer around needing to apply an aggregate function to the AggregateFunction field.

Expected behavior

Show the AggregatedFunction hash or a clearer error message around how to query AggregateFunctions.

Information about your Metabase installation

Chrome Version 117.0.5938.92 (Official Build) (arm64)
ClickHouse server version 23.6.1 revision 54464
Metabase version v0.46.2
@wickyvinn wickyvinn added the bug Something isn't working label Oct 4, 2023
@slvrtrn slvrtrn added enhancement New feature or request blocked-by-jdbc and removed bug Something isn't working labels Oct 5, 2023
@slvrtrn
Copy link
Collaborator

slvrtrn commented Oct 5, 2023

See the known limitations:

As the underlying JDBC driver version does not support columns with AggregateFunction type, these columns are excluded from the table metadata and data browser result sets to prevent sync or data browsing errors.

I will keep this issue open as a feature request.

NB: while AggregateFunction columns are excluded from the columns list, SimpleAggregateFunction ones should work fine.

@wickyvinn
Copy link
Author

See the known limitations:

As the underlying JDBC driver version does not support columns with AggregateFunction type, these columns are excluded from the table metadata and data browser result sets to prevent sync or data browsing errors.

I will keep this issue open as a feature request.

NB: while AggregateFunction columns are excluded from the columns list, SimpleAggregateFunction ones should work fine.

Thanks @slvrtrn. Unfortunately it appears that SimpleAggregateFunction does not support avg which which is the crux of using ReplicatedAggregatingMergeTree for us. Nonetheless, thanks for keeping it open as a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-by-jdbc enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants