From eba1db4162e8a067cef368dcbb121d4365c88b94 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 15:42:05 +0000 Subject: [PATCH] Update query snapshots --- .../test_funnel_strict_persons.ambr | 42 +++++++++---------- .../test_funnel_trends_persons.ambr | 42 +++++++++---------- .../test_funnel_unordered_persons.ambr | 14 +++---- .../test_retention_query_runner.ambr | 32 +++++++------- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons.ambr index 1496e07c65e02..43eee21ac83ce 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons.ambr @@ -5,12 +5,6 @@ persons.id AS id, source.matching_events AS matching_events FROM - (SELECT person.id AS id - FROM person - WHERE equals(person.team_id, 2) - GROUP BY person.id - HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons - INNER JOIN (SELECT aggregation_target AS actor_id, step_0_matching_events AS matching_events FROM @@ -119,7 +113,13 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [1, 2, 3]), 0) - ORDER BY aggregation_target ASC) AS source ON equals(persons.id, source.actor_id) + ORDER BY aggregation_target ASC) AS source + INNER JOIN + (SELECT person.id AS id + FROM person + WHERE equals(person.team_id, 2) + GROUP BY person.id + HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons ON equals(persons.id, source.actor_id) ORDER BY persons.id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2, @@ -147,12 +147,6 @@ persons.id AS id, source.matching_events AS matching_events FROM - (SELECT person.id AS id - FROM person - WHERE equals(person.team_id, 2) - GROUP BY person.id - HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons - INNER JOIN (SELECT aggregation_target AS actor_id, step_1_matching_events AS matching_events FROM @@ -261,7 +255,13 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [2, 3]), 0) - ORDER BY aggregation_target ASC) AS source ON equals(persons.id, source.actor_id) + ORDER BY aggregation_target ASC) AS source + INNER JOIN + (SELECT person.id AS id + FROM person + WHERE equals(person.team_id, 2) + GROUP BY person.id + HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons ON equals(persons.id, source.actor_id) ORDER BY persons.id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2, @@ -289,12 +289,6 @@ persons.id AS id, source.matching_events AS matching_events FROM - (SELECT person.id AS id - FROM person - WHERE equals(person.team_id, 2) - GROUP BY person.id - HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons - INNER JOIN (SELECT aggregation_target AS actor_id, step_1_matching_events AS matching_events FROM @@ -403,7 +397,13 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(equals(steps, 2), 0) - ORDER BY aggregation_target ASC) AS source ON equals(persons.id, source.actor_id) + ORDER BY aggregation_target ASC) AS source + INNER JOIN + (SELECT person.id AS id + FROM person + WHERE equals(person.team_id, 2) + GROUP BY person.id + HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons ON equals(persons.id, source.actor_id) ORDER BY persons.id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2, diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_persons.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_persons.ambr index 32518bdbf9bbc..2c6daed30808b 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_persons.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_persons.ambr @@ -5,12 +5,6 @@ persons.id AS id, source.matching_events AS matching_events FROM - (SELECT person.id AS id - FROM person - WHERE equals(person.team_id, 2) - GROUP BY person.id - HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons - INNER JOIN (SELECT aggregation_target AS actor_id, step_1_matching_events AS matching_events FROM @@ -145,7 +139,13 @@ GROUP BY aggregation_target, entrance_period_start) WHERE ifNull(greaterOrEquals(steps_completed, 2), 0) - ORDER BY aggregation_target ASC) AS source ON equals(persons.id, source.actor_id) + ORDER BY aggregation_target ASC) AS source + INNER JOIN + (SELECT person.id AS id + FROM person + WHERE equals(person.team_id, 2) + GROUP BY person.id + HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons ON equals(persons.id, source.actor_id) ORDER BY persons.id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2, @@ -173,12 +173,6 @@ persons.id AS id, source.matching_events AS matching_events FROM - (SELECT person.id AS id - FROM person - WHERE equals(person.team_id, 2) - GROUP BY person.id - HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons - INNER JOIN (SELECT aggregation_target AS actor_id, final_matching_events AS matching_events FROM @@ -313,7 +307,13 @@ GROUP BY aggregation_target, entrance_period_start) WHERE and(ifNull(greaterOrEquals(steps_completed, 1), 0), ifNull(less(steps_completed, 3), 0)) - ORDER BY aggregation_target ASC) AS source ON equals(persons.id, source.actor_id) + ORDER BY aggregation_target ASC) AS source + INNER JOIN + (SELECT person.id AS id + FROM person + WHERE equals(person.team_id, 2) + GROUP BY person.id + HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons ON equals(persons.id, source.actor_id) ORDER BY persons.id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2, @@ -341,12 +341,6 @@ persons.id AS id, source.matching_events AS matching_events FROM - (SELECT person.id AS id - FROM person - WHERE equals(person.team_id, 2) - GROUP BY person.id - HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons - INNER JOIN (SELECT aggregation_target AS actor_id, final_matching_events AS matching_events FROM @@ -481,7 +475,13 @@ GROUP BY aggregation_target, entrance_period_start) WHERE ifNull(greaterOrEquals(steps_completed, 3), 0) - ORDER BY aggregation_target ASC) AS source ON equals(persons.id, source.actor_id) + ORDER BY aggregation_target ASC) AS source + INNER JOIN + (SELECT person.id AS id + FROM person + WHERE equals(person.team_id, 2) + GROUP BY person.id + HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons ON equals(persons.id, source.actor_id) ORDER BY persons.id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2, diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_unordered_persons.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_unordered_persons.ambr index 5ced3fb2b9766..7f607b21570bc 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_unordered_persons.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_unordered_persons.ambr @@ -5,12 +5,6 @@ persons.id AS id, source.matching_events AS matching_events FROM - (SELECT person.id AS id - FROM person - WHERE equals(person.team_id, 2) - GROUP BY person.id - HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons - INNER JOIN (SELECT aggregation_target AS actor_id, array() AS matching_events FROM @@ -263,7 +257,13 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [1, 2, 3]), 0) - ORDER BY aggregation_target ASC) AS source ON equals(persons.id, source.actor_id) + ORDER BY aggregation_target ASC) AS source + INNER JOIN + (SELECT person.id AS id + FROM person + WHERE equals(person.team_id, 2) + GROUP BY person.id + HAVING ifNull(equals(argMax(person.is_deleted, person.version), 0), 0) SETTINGS optimize_aggregation_in_order=1) AS persons ON equals(persons.id, source.actor_id) ORDER BY persons.id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2, diff --git a/posthog/hogql_queries/insights/test/__snapshots__/test_retention_query_runner.ambr b/posthog/hogql_queries/insights/test/__snapshots__/test_retention_query_runner.ambr index 4e2714d2e7212..f961e10d59a03 100644 --- a/posthog/hogql_queries/insights/test/__snapshots__/test_retention_query_runner.ambr +++ b/posthog/hogql_queries/insights/test/__snapshots__/test_retention_query_runner.ambr @@ -50,13 +50,6 @@ SELECT groups.key AS key, source.appearances AS appearances FROM - (SELECT groups.group_type_index AS index, - groups.group_key AS key - FROM groups - WHERE equals(groups.team_id, 2) - GROUP BY groups.group_type_index, - groups.group_key) AS groups - INNER JOIN (SELECT actor_activity.actor_id AS actor_id, groupArray(actor_activity.intervals_from_base) AS appearance_intervals, arraySort(appearance_intervals) AS appearances, @@ -99,7 +92,14 @@ FROM events WHERE and(equals(events.team_id, 2), equals(events.event, '$pageview'), not(has([''], events.`$group_0`)), and(greaterOrEquals(toTimeZone(events.timestamp, 'UTC'), toStartOfWeek(toDateTime64('2020-06-07 00:00:00.000000', 6, 'UTC'), 0)), lessOrEquals(toTimeZone(events.timestamp, 'UTC'), toDateTime64('2020-07-27 00:00:00.000000', 6, 'UTC'))))) AS target_event) WHERE and(or(0, ifNull(equals(breakdown_values, [0]), 0)), or(1, isNull(intervals_from_base)))) AS actor_activity - GROUP BY actor_activity.actor_id) AS source ON equals(groups.key, source.actor_id) + GROUP BY actor_activity.actor_id) AS source + INNER JOIN + (SELECT groups.group_type_index AS index, + groups.group_key AS key + FROM groups + WHERE equals(groups.team_id, 2) + GROUP BY groups.group_type_index, + groups.group_key) AS groups ON equals(groups.key, source.actor_id) ORDER BY length(source.appearances) DESC, source.actor_id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2, @@ -204,13 +204,6 @@ SELECT groups.key AS key, source.appearances AS appearances FROM - (SELECT groups.group_type_index AS index, - groups.group_key AS key - FROM groups - WHERE equals(groups.team_id, 2) - GROUP BY groups.group_type_index, - groups.group_key) AS groups - INNER JOIN (SELECT actor_activity.actor_id AS actor_id, groupArray(actor_activity.intervals_from_base) AS appearance_intervals, arraySort(appearance_intervals) AS appearances, @@ -253,7 +246,14 @@ FROM events WHERE and(equals(events.team_id, 2), equals(events.event, '$pageview'), not(has([''], events.`$group_0`)), and(greaterOrEquals(toTimeZone(events.timestamp, 'UTC'), toStartOfWeek(toDateTime64('2020-06-07 00:00:00.000000', 6, 'UTC'), 0)), lessOrEquals(toTimeZone(events.timestamp, 'UTC'), toDateTime64('2020-07-27 00:00:00.000000', 6, 'UTC'))))) AS target_event) WHERE and(or(0, ifNull(equals(breakdown_values, [0]), 0)), or(1, isNull(intervals_from_base)))) AS actor_activity - GROUP BY actor_activity.actor_id) AS source ON equals(groups.key, source.actor_id) + GROUP BY actor_activity.actor_id) AS source + INNER JOIN + (SELECT groups.group_type_index AS index, + groups.group_key AS key + FROM groups + WHERE equals(groups.team_id, 2) + GROUP BY groups.group_type_index, + groups.group_key) AS groups ON equals(groups.key, source.actor_id) ORDER BY length(source.appearances) DESC, source.actor_id ASC LIMIT 101 OFFSET 0 SETTINGS readonly=2,