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
It appears that the plugin does not properly group results when using ARRAY JOIN with GROUP BY in a query.
Using the following query from grafana, I would expect the graph to plot the separate (key, value) pairs by time:
select
toUInt32(time) *1000as t,
dataMap.keyas key,
sum(dataMap.value) as value
fromtest.nested_array_join_example
array join dataMap
group by t, key
order by t, key
Instead, the graph does not plot them appropriately:
The example above can be tested with the following:
createdatabaseif not exists test;
createtableif not exists test.nested_array_join_example
(
time DateTime,
dataMap Nested (
key String,
value UInt64
)
)
engine = MergeTree
partition by (toYYYYMMDD(time))
order by (time);
insert intotest.nested_array_join_examplevalues
(1613710800, ['a', 'b'], [1, 2]),
(1613710800, ['a', 'b'], [3, 4]),
(1613710801, ['a', 'b'], [5, 6]),
(1613710801, ['a', 'b'], [7, 8]),
(1613710802, ['a', 'b'], [9, 10]);
I have the same problem and solved it by using a VIEW on the server, which returns an identical result set. The problem appears to be the JOIN keyword, when it is present in the query, the function is disabled.
It appears that the plugin does not properly group results when using
ARRAY JOIN
withGROUP BY
in a query.Using the following query from grafana, I would expect the graph to plot the separate (key, value) pairs by time:
Instead, the graph does not plot them appropriately:
The example above can be tested with the following:
Versions
The text was updated successfully, but these errors were encountered: