Hi, I am facing an error, when I run a query like ...
# troubleshooting
h
Hi, I am facing an error, when I run a query like select col1, count() from table where col2='val' group by col1 having count() >1 it works on pinot but fails when run via trino-pinot connector. Error: Error from Query Engine
ExtractedRaw
Query select "internal_error_code", count("*") from sr_view_v1 where (("count(*)" > '1')) AND ("network" = 'Visa') group by "internal_error_code" limit 5000001 encountered exception org.apache.pinot.common.response.broker.QueryProcessingException@3e0dac0b with query "select "internal_error_code", count("*") from sr_view_v1 where (("count(*)" > '1')) AND ("network" = 'Visa') group by "internal_error_code" limit 5000001"
m
@Elon ^^
h
@Elon what can we do here?
e
Unfortunately having support is not yet supported. I have code for it working here, need to open source it.
As a workaround you can filter the
count(*)
column in an outer trino query.
h
just to confirm you mean the support for it is not there in the trino-pinot connector right? I checked the query works on pinot. also, the filters are generated by a BI tool (looker), let me check if there is a way I can filter the count(*) outside somehow, not too sure about it
@Elon can you provide us the code that you have working for "having" query?
e
absolutely, will update you.
👍 1
h
@Elon hey, following up on previous conv.
e
Hi, I will likely have something this week, will keep you updated.
thankyou 1
h
hi @Elon @Mayank just following up on this thread, is there a solution/ workaround we can do?
ok i see there is a PR for this already https://github.com/trinodb/trino/pull/13429 , thanks, any way we can ask the community to prioritize this?