0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 00:47:50 +01:00

Properties are now considered for data warehouse series

This commit is contained in:
Daniel Bachhuber 2024-11-21 10:20:43 -08:00
parent 68a5d72b95
commit 45eff94122
2 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@
(SELECT count() AS total,
toStartOfDay(toTimeZone(e.created, 'UTC')) AS day_start
FROM s3('http://host.docker.internal:19000/posthog/test_storage_bucket-posthog.hogql.datawarehouse.trendquery/*.parquet', 'object_storage_root_user', 'object_storage_root_password', 'Parquet', '`id` String, `prop_1` String, `prop_2` String, `created` DateTime64(3, \'UTC\')') AS e
WHERE and(ifNull(greaterOrEquals(toTimeZone(e.created, 'UTC'), toStartOfDay(assumeNotNull(parseDateTime64BestEffortOrNull('2023-01-01 00:00:00', 6, 'UTC')))), 0), ifNull(lessOrEquals(toTimeZone(e.created, 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2023-01-07 23:59:59', 6, 'UTC'))), 0))
WHERE and(ifNull(greaterOrEquals(toTimeZone(e.created, 'UTC'), toStartOfDay(assumeNotNull(parseDateTime64BestEffortOrNull('2023-01-01 00:00:00', 6, 'UTC')))), 0), ifNull(lessOrEquals(toTimeZone(e.created, 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2023-01-07 23:59:59', 6, 'UTC'))), 0), equals(e.prop_1, 'a'))
GROUP BY day_start)
GROUP BY day_start
ORDER BY day_start ASC)

View File

@ -229,7 +229,7 @@ class TestTrendsDataWarehouseQuery(ClickhouseTestMixin, BaseTest):
assert response.columns is not None
assert set(response.columns).issubset({"date", "total"})
assert response.results[0][1] == [1, 1, 1, 1, 0, 0, 0]
assert response.results[0][1] == [1, 0, 0, 0, 0, 0, 0]
@snapshot_clickhouse_queries
def test_trends_breakdown(self):