fix: revert arrayMap on stats_hourly to avoid misaligned arrays

The website_event_stats_hourly materialized view stores url_path and
url_query as independently filtered arrays, so their indices do not
correspond event-by-event. Using arrayMap to zip them would produce
wrong URL pairings and silently drop entries.

Reverted the stats_hourly path to use arrayJoin(url_path) as before.
The url_query concatenation still works correctly on direct
website_event queries (both PostgreSQL and ClickHouse).
This commit is contained in:
seojcarlos committed 2026-04-08 08:22:49 +02:00
1 parent 509a91b990
commit c229f7466f
1 file changed
+1 -3
@@ -163,9 +163,7 @@ async function clickhouseQuery(
`;
} else {
let groupByQuery = '';
let columnQuery = isPathType
? `arrayJoin(arrayMap((p, q) -> if(q != '', concat(p, '?', q), p), url_path, url_query))`
: `arrayJoin(${column})`;
let columnQuery = `arrayJoin(${column})`;
if (column === 'referrer_domain') {
excludeDomain = `and t != ''`;