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 Sep 11, 2024
1 parent 83ab9f8 commit 4c080a0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 12 deletions.
4 changes: 4 additions & 0 deletions posthog/api/test/__snapshots__/test_decide.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"posthog_team"."ingested_event",
"posthog_team"."autocapture_opt_out",
"posthog_team"."autocapture_web_vitals_opt_in",
"posthog_team"."autocapture_web_vitals_allowed_metrics",
"posthog_team"."autocapture_exceptions_opt_in",
"posthog_team"."autocapture_exceptions_errors_to_ignore",
"posthog_team"."session_recording_opt_in",
Expand Down Expand Up @@ -162,6 +163,7 @@
"posthog_team"."ingested_event",
"posthog_team"."autocapture_opt_out",
"posthog_team"."autocapture_web_vitals_opt_in",
"posthog_team"."autocapture_web_vitals_allowed_metrics",
"posthog_team"."autocapture_exceptions_opt_in",
"posthog_team"."autocapture_exceptions_errors_to_ignore",
"posthog_team"."session_recording_opt_in",
Expand Down Expand Up @@ -227,6 +229,7 @@
"posthog_team"."ingested_event",
"posthog_team"."autocapture_opt_out",
"posthog_team"."autocapture_web_vitals_opt_in",
"posthog_team"."autocapture_web_vitals_allowed_metrics",
"posthog_team"."autocapture_exceptions_opt_in",
"posthog_team"."autocapture_exceptions_errors_to_ignore",
"posthog_team"."session_recording_opt_in",
Expand Down Expand Up @@ -570,6 +573,7 @@
"posthog_team"."ingested_event",
"posthog_team"."autocapture_opt_out",
"posthog_team"."autocapture_web_vitals_opt_in",
"posthog_team"."autocapture_web_vitals_allowed_metrics",
"posthog_team"."autocapture_exceptions_opt_in",
"posthog_team"."autocapture_exceptions_errors_to_ignore",
"posthog_team"."session_recording_opt_in",
Expand Down
48 changes: 36 additions & 12 deletions posthog/api/test/__snapshots__/test_event.ambr
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# 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
FROM events
WHERE timestamp > date_sub(DAY, 3, now())
AND timestamp < now()
GROUP BY team_id
ORDER BY age;
'''
# ---
# name: TestEvents.test_event_property_values.1
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '')
Expand All @@ -11,7 +23,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values.1
# name: TestEvents.test_event_property_values.2
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '')
Expand All @@ -25,7 +37,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values.2
# name: TestEvents.test_event_property_values.3
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '')
Expand All @@ -39,7 +51,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values.3
# name: TestEvents.test_event_property_values.4
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '')
Expand All @@ -53,7 +65,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values.4
# name: TestEvents.test_event_property_values.5
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '')
Expand All @@ -68,7 +80,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values.5
# name: TestEvents.test_event_property_values.6
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '')
Expand All @@ -84,7 +96,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values.6
# name: TestEvents.test_event_property_values.7
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT replaceRegexpAll(JSONExtractRaw(properties, 'random_prop'), '^"|"$', '')
Expand All @@ -100,6 +112,18 @@
'''
# ---
# 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
FROM events
WHERE timestamp > date_sub(DAY, 3, now())
AND timestamp < now()
GROUP BY team_id
ORDER BY age;
'''
# ---
# name: TestEvents.test_event_property_values_materialized.1
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT "mat_random_prop"
Expand All @@ -111,7 +135,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values_materialized.1
# name: TestEvents.test_event_property_values_materialized.2
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT "mat_random_prop"
Expand All @@ -125,7 +149,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values_materialized.2
# name: TestEvents.test_event_property_values_materialized.3
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT "mat_random_prop"
Expand All @@ -139,7 +163,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values_materialized.3
# name: TestEvents.test_event_property_values_materialized.4
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT "mat_random_prop"
Expand All @@ -153,7 +177,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values_materialized.4
# name: TestEvents.test_event_property_values_materialized.5
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT "mat_random_prop"
Expand All @@ -168,7 +192,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values_materialized.5
# name: TestEvents.test_event_property_values_materialized.6
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT "mat_random_prop"
Expand All @@ -184,7 +208,7 @@
LIMIT 10
'''
# ---
# name: TestEvents.test_event_property_values_materialized.6
# name: TestEvents.test_event_property_values_materialized.7
'''
/* user_id:0 request:_snapshot_ */
SELECT DISTINCT "mat_random_prop"
Expand Down

0 comments on commit 4c080a0

Please sign in to comment.