You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select count(distinct group_id) from clickhouse.public.testtable;
But he worked very slowly, because not the most optimal execution plan was drawn up for him:
trino> explain select count(distinct group_id) from clickhouse.public.testtable;
Query Plan
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Trino version: testversion
Fragment 0 [SOURCE]
Output layout: [_pfgnrtd]
Output partitioning: SINGLE []
Output[columnNames = [_col0]]
│ Layout: [_pfgnrtd:bigint]
│ Estimates: {rows: ? (?), cpu: 0, memory: 0B, network: 0B}
│ _col0 := _pfgnrtd
└─ TableScan[table = clickhouse:Query[SELECT count("group_id") AS "_pfgnrtd_0" FROM (SELECT "group_id" FROM "public"."testtable" GROUP BY "group_id") o] columns=[_pfgnrtd_0:bigint:bigint]]
Layout: [_pfgnrtd:bigint]
Estimates: {rows: ? (?), cpu: ?, memory: 0B, network: 0B}
_pfgnrtd := _pfgnrtd_0:bigint:bigint
(1 row)
But ClickHouse has a large number of built-in functions. One of them will allow me to execute my query much faster, namely uniqExact. And I would like to execute the following query:
trino> select uniq(val) from clickhouse.public.testtable;
Query 20230412_132742_00029_e9aab failed: line 1:7: Function 'uniq' not registered
LINE 1: select uniqExact(group_id) from clickhouse.public.testtable
But trino doesn't know anything about this function. Can I somehow call the built-in functions in ClickHouse (and basically any other data source)?
I found in the documentation how to create my own functions, but as I understand it, they allow you to implement my logic, but in no way provide access to existing functions
The text was updated successfully, but these errors were encountered:
Recently I had to make such a query:
select count(distinct group_id) from clickhouse.public.testtable;
But he worked very slowly, because not the most optimal execution plan was drawn up for him:
But ClickHouse has a large number of built-in functions. One of them will allow me to execute my query much faster, namely
uniqExact
. And I would like to execute the following query:But trino doesn't know anything about this function. Can I somehow call the built-in functions in ClickHouse (and basically any other data source)?
I found in the documentation how to create my own functions, but as I understand it, they allow you to implement my logic, but in no way provide access to existing functions
The text was updated successfully, but these errors were encountered: