From c372e9cb83548eb377a5e2a8065b7481013c6130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Tue, 28 Jan 2025 11:09:20 +0100 Subject: [PATCH] fix: Use alias in distributed events recent query (#27945) --- posthog/temporal/batch_exports/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posthog/temporal/batch_exports/sql.py b/posthog/temporal/batch_exports/sql.py index 9c79e008440a2..af7b2ff04b7bc 100644 --- a/posthog/temporal/batch_exports/sql.py +++ b/posthog/temporal/batch_exports/sql.py @@ -164,7 +164,7 @@ AND (length({exclude_events}::Array(String)) = 0 OR event NOT IN {exclude_events}::Array(String)) ORDER BY _inserted_at, event -) +) AS events FORMAT ArrowStream SETTINGS optimize_aggregation_in_order=1,