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
WITH topx as(select DISTINCT(case when $split :: text = '' then 'other'::text else $split::text end)::text as filter, count() as cnt from $table where $timeFilter and $adhoc group by $split order by cnt desc limit 10)
SELECT
$timeSeries as t,
case when $split :: text in (select filter from topx) then $split::text else 'other' end :: text as spl,
count()
FROM $table data
WHERE
$timeFilter
and $adhoc
GROUP BY spl, t
ORDER BY spl, t
It works fine until I apply an adhoc filter, then it becomes malformed and the plugin that uses that filter crashes.
After I applied adhoc filter query looks like this:
WITH topx as(select DISTINCT(case when place : : text = '' then 'other' : : text else place : : text end) : : text as filter, count() as cnt from database_name.table_name where referencetime >= toDateTime(1651034567) AND referencetime <= toDateTime(1651045367) and (number = 20 ) group by place order by cnt desc limit 10)
SELECT
(intDiv(toUInt32(referencetime), 300) * 300) * 1000 as t,
case when place : : text in (
SELECT filter
FROM topx
),
then place : : text else 'other' end : : text as spl,
count()
FROM database_name.table_name data
WHERE
referencetime >= toDateTime(1651034567) AND referencetime <= toDateTime(1651045367)
and (number = 20)
GROUP BY
spl,
t
ORDER BY
spl,
t
It seems that after the adhoc filter is applied the query becomes malformed, but also if I press Reformat Query without the applied adhoc filter the query is incorrectly formed.
Two issues:
all :: are replaced with : : - the space between the colons
there is an additional comma after the FROM topx) , then place ... which also breaks the query
The text was updated successfully, but these errors were encountered:
I use this query:
It works fine until I apply an adhoc filter, then it becomes malformed and the plugin that uses that filter crashes.
After I applied adhoc filter query looks like this:
It seems that after the adhoc filter is applied the query becomes malformed, but also if I press Reformat Query without the applied adhoc filter the query is incorrectly formed.
Two issues:
: :
- the space between the colonsThe text was updated successfully, but these errors were encountered: