Skip to content

Commit

Permalink
lots of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fuziontech committed Oct 11, 2024
1 parent b81a36d commit 859e43b
Show file tree
Hide file tree
Showing 35 changed files with 502 additions and 783 deletions.
6 changes: 0 additions & 6 deletions ee/api/test/__snapshots__/test_instance_settings.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@
ALTER TABLE sharded_performance_events ON CLUSTER 'posthog' MODIFY TTL toDate(timestamp) + toIntervalWeek(5)
'''
# ---
# name: TestInstanceSettings.test_update_recordings_ttl_setting
'''
/* user_id:0 request:_snapshot_ */
ALTER TABLE sharded_session_recording_events ON CLUSTER 'posthog' MODIFY TTL toDate(created_at) + toIntervalWeek(5)
'''
# ---
14 changes: 0 additions & 14 deletions ee/api/test/__snapshots__/test_organization_resource_access.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,6 @@
LIMIT 100
'''
# ---
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.14
'''
SELECT "ee_organizationresourceaccess"."id",
"ee_organizationresourceaccess"."resource",
"ee_organizationresourceaccess"."access_level",
"ee_organizationresourceaccess"."organization_id",
"ee_organizationresourceaccess"."created_by_id",
"ee_organizationresourceaccess"."created_at",
"ee_organizationresourceaccess"."updated_at"
FROM "ee_organizationresourceaccess"
WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
LIMIT 100
'''
# ---
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.2
'''
SELECT "posthog_organization"."id",
Expand Down
2 changes: 1 addition & 1 deletion ee/clickhouse/queries/funnels/funnel_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def get_event_property_query(self) -> tuple[str, dict[str, Any]]:
{event_join_query}
AND event.event IN %(event_names)s
)
GROUP BY name
GROUP BY name, prop
-- Discard high cardinality / low hits properties
-- This removes the long tail of random properties with empty, null, or very small values
HAVING (success_count + failure_count) > 2
Expand Down
21 changes: 21 additions & 0 deletions ee/clickhouse/queries/funnels/test/__snapshots__/test_funnel.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -278,6 +279,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -423,6 +425,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -561,6 +564,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [1, 2, 3]
Expand Down Expand Up @@ -704,6 +708,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [2, 3]
Expand Down Expand Up @@ -847,6 +852,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [1, 2, 3]
Expand Down Expand Up @@ -990,6 +996,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [2, 3]
Expand Down Expand Up @@ -1130,6 +1137,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -1279,6 +1287,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -1424,6 +1433,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -1539,6 +1549,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [1, 2, 3]
Expand Down Expand Up @@ -1659,6 +1670,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [2, 3]
Expand Down Expand Up @@ -1779,6 +1791,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [1, 2, 3]
Expand Down Expand Up @@ -1899,6 +1912,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [2, 3]
Expand Down Expand Up @@ -2039,6 +2053,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -2188,6 +2203,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -2333,6 +2349,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
GROUP BY prop
Expand Down Expand Up @@ -2628,6 +2645,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [1, 2, 3]
Expand Down Expand Up @@ -2928,6 +2946,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [2, 3]
Expand Down Expand Up @@ -3228,6 +3247,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [1, 2, 3]
Expand Down Expand Up @@ -3528,6 +3548,7 @@
WHERE step_0 = 1 ))
GROUP BY aggregation_target,
steps,
max_steps,
prop
HAVING steps = max_steps)
WHERE steps IN [2, 3]
Expand Down
Loading

0 comments on commit 859e43b

Please sign in to comment.