Skip to content

Commit

Permalink
Update query snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 12, 2024
1 parent 58c3b24 commit e42105e
Showing 1 changed file with 32 additions and 26 deletions.
58 changes: 32 additions & 26 deletions posthog/api/test/__snapshots__/test_event.ambr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# serializer version: 1
# name: TestEvents.test_event_property_values
'''
/* celery:posthog.tasks.tasks.sync_insight_caching_state */
SELECT team_id,
date_diff('second', max(timestamp), now()) AS age
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '')
FROM events
WHERE timestamp > date_sub(DAY, 3, now())
AND timestamp < now()
GROUP BY team_id
ORDER BY age;
WHERE team_id = 99999
AND JSONHas(properties, 'random_prop')
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values.1
Expand All @@ -20,6 +20,8 @@
AND JSONHas(properties, 'random_prop')
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%qw%'
order by length(replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', ''))
LIMIT 10
'''
# ---
Expand All @@ -32,7 +34,7 @@
AND JSONHas(properties, 'random_prop')
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%qw%'
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%QW%'
order by length(replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', ''))
LIMIT 10
'''
Expand All @@ -46,7 +48,7 @@
AND JSONHas(properties, 'random_prop')
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%QW%'
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%6%'
order by length(replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', ''))
LIMIT 10
'''
Expand All @@ -60,6 +62,7 @@
AND JSONHas(properties, 'random_prop')
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND (event = 'random event')
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%6%'
order by length(replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', ''))
LIMIT 10
Expand All @@ -74,7 +77,8 @@
AND JSONHas(properties, 'random_prop')
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND (event = 'random event')
AND (event = 'foo'
OR event = 'random event')
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%6%'
order by length(replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', ''))
LIMIT 10
Expand All @@ -89,9 +93,8 @@
AND JSONHas(properties, 'random_prop')
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND (event = 'foo'
OR event = 'random event')
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%6%'
AND (event = '404_i_dont_exist')
AND replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '') ILIKE '%qw%'
order by length(replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', ''))
LIMIT 10
'''
Expand All @@ -113,14 +116,14 @@
# ---
# name: TestEvents.test_event_property_values_materialized
'''
/* celery:posthog.tasks.tasks.sync_insight_caching_state */
SELECT team_id,
date_diff('second', max(timestamp), now()) AS age
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT "mat_random_prop"
FROM events
WHERE timestamp > date_sub(DAY, 3, now())
AND timestamp < now()
GROUP BY team_id
ORDER BY age;
WHERE team_id = 99999
AND notEmpty("mat_random_prop")
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values_materialized.1
Expand All @@ -132,6 +135,8 @@
AND notEmpty("mat_random_prop")
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND "mat_random_prop" ILIKE '%qw%'
order by length("mat_random_prop")
LIMIT 10
'''
# ---
Expand All @@ -144,7 +149,7 @@
AND notEmpty("mat_random_prop")
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND "mat_random_prop" ILIKE '%qw%'
AND "mat_random_prop" ILIKE '%QW%'
order by length("mat_random_prop")
LIMIT 10
'''
Expand All @@ -158,7 +163,7 @@
AND notEmpty("mat_random_prop")
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND "mat_random_prop" ILIKE '%QW%'
AND "mat_random_prop" ILIKE '%6%'
order by length("mat_random_prop")
LIMIT 10
'''
Expand All @@ -172,6 +177,7 @@
AND notEmpty("mat_random_prop")
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND (event = 'random event')
AND "mat_random_prop" ILIKE '%6%'
order by length("mat_random_prop")
LIMIT 10
Expand All @@ -186,7 +192,8 @@
AND notEmpty("mat_random_prop")
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND (event = 'random event')
AND (event = 'foo'
OR event = 'random event')
AND "mat_random_prop" ILIKE '%6%'
order by length("mat_random_prop")
LIMIT 10
Expand All @@ -201,9 +208,8 @@
AND notEmpty("mat_random_prop")
AND timestamp >= '2020-01-13 00:00:00'
AND timestamp <= '2020-01-20 23:59:59'
AND (event = 'foo'
OR event = 'random event')
AND "mat_random_prop" ILIKE '%6%'
AND (event = '404_i_dont_exist')
AND "mat_random_prop" ILIKE '%qw%'
order by length("mat_random_prop")
LIMIT 10
'''
Expand Down

0 comments on commit e42105e

Please sign in to comment.