From f9be4fa28668e242d56bab9651cf9c79b40d9249 Mon Sep 17 00:00:00 2001 From: Sandy Spicer Date: Thu, 5 Dec 2024 00:39:02 -0600 Subject: [PATCH] fix: issue with is identified boolean clickhouse (#26604) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- .../test_person_where_clause_extractor.py | 2 +- posthog/hogql/functions/mapping.py | 1 + posthog/hogql/test/test_printer.py | 12 +- posthog/hogql/transforms/property_types.py | 15 +- .../__snapshots__/test_property_types.ambr | 6 +- .../transforms/test/test_property_types.py | 2 +- .../hogql_queries/insights/funnels/base.py | 2 +- .../test_funnel_correlation_actors_udf.ambr | 12 +- .../test_funnel_correlation_udf.ambr | 172 +++++++++--------- .../test_funnel_persons_udf.ambr | 6 +- .../test_funnel_strict_persons_udf.ambr | 6 +- .../__snapshots__/test_funnel_strict_udf.ambr | 20 +- .../test_funnel_trends_actors_udf.ambr | 6 +- .../__snapshots__/test_funnel_trends_udf.ambr | 6 +- .../test/__snapshots__/test_funnel_udf.ambr | 40 ++-- 15 files changed, 157 insertions(+), 151 deletions(-) diff --git a/posthog/hogql/database/schema/util/test/test_person_where_clause_extractor.py b/posthog/hogql/database/schema/util/test/test_person_where_clause_extractor.py index 73459b375879e..91ba9dca6094d 100644 --- a/posthog/hogql/database/schema/util/test/test_person_where_clause_extractor.py +++ b/posthog/hogql/database/schema/util/test/test_person_where_clause_extractor.py @@ -194,6 +194,6 @@ def test_boolean(self): ) actual = self.print_query("SELECT * FROM events WHERE person.properties.person_boolean = false") assert ( - f"ifNull(equals(transform(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person.properties" + f"ifNull(equals(toBool(transform(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person.properties" in actual ) diff --git a/posthog/hogql/functions/mapping.py b/posthog/hogql/functions/mapping.py index d0f4755c67bad..a422e16dc989c 100644 --- a/posthog/hogql/functions/mapping.py +++ b/posthog/hogql/functions/mapping.py @@ -432,6 +432,7 @@ def compare_types(arg_types: list[ConstantType], sig_arg_types: tuple[ConstantTy ((DateTimeType(), StringType()), StringType()), ], ), + "toBool": HogQLFunctionMeta("toBool", 1, 1), "toJSONString": HogQLFunctionMeta("toJSONString", 1, 1), "parseDateTime": HogQLFunctionMeta("parseDateTimeOrNull", 2, 3, tz_aware=True), "parseDateTimeBestEffort": HogQLFunctionMeta("parseDateTime64BestEffortOrNull", 1, 2, tz_aware=True), diff --git a/posthog/hogql/test/test_printer.py b/posthog/hogql/test/test_printer.py index 3d369f5574f4e..8d7dad46040ac 100644 --- a/posthog/hogql/test/test_printer.py +++ b/posthog/hogql/test/test_printer.py @@ -1603,18 +1603,18 @@ def test_field_nullable_boolean(self): ) assert generated_sql_statements1 == ( f"SELECT " - "ifNull(equals(transform(toString(nullIf(nullIf(events.mat_is_boolean, ''), 'null')), %(hogql_val_0)s, %(hogql_val_1)s, NULL), 1), 0), " - "ifNull(equals(transform(toString(nullIf(nullIf(events.mat_is_boolean, ''), 'null')), %(hogql_val_2)s, %(hogql_val_3)s, NULL), 0), 0), " - "isNull(transform(toString(nullIf(nullIf(events.mat_is_boolean, ''), 'null')), %(hogql_val_4)s, %(hogql_val_5)s, NULL)) " + "ifNull(equals(toBool(transform(toString(nullIf(nullIf(events.mat_is_boolean, ''), 'null')), %(hogql_val_0)s, %(hogql_val_1)s, NULL)), 1), 0), " + "ifNull(equals(toBool(transform(toString(nullIf(nullIf(events.mat_is_boolean, ''), 'null')), %(hogql_val_2)s, %(hogql_val_3)s, NULL)), 0), 0), " + "isNull(toBool(transform(toString(nullIf(nullIf(events.mat_is_boolean, ''), 'null')), %(hogql_val_4)s, %(hogql_val_5)s, NULL))) " f"FROM events WHERE equals(events.team_id, {self.team.pk}) LIMIT {MAX_SELECT_RETURNED_ROWS}" ) assert context.values == { "hogql_val_0": ["true", "false"], - "hogql_val_1": [True, False], + "hogql_val_1": [1, 0], "hogql_val_2": ["true", "false"], - "hogql_val_3": [True, False], + "hogql_val_3": [1, 0], "hogql_val_4": ["true", "false"], - "hogql_val_5": [True, False], + "hogql_val_5": [1, 0], } def test_field_nullable_like(self): diff --git a/posthog/hogql/transforms/property_types.py b/posthog/hogql/transforms/property_types.py index da36de8d988ea..6dbac74590da6 100644 --- a/posthog/hogql/transforms/property_types.py +++ b/posthog/hogql/transforms/property_types.py @@ -221,12 +221,17 @@ def _field_type_to_property_call(self, node: ast.Field, field_type: str): return ast.Call(name="toFloat", args=[node]) if field_type == "Boolean": return ast.Call( - name="transform", + name="toBool", args=[ - ast.Call(name="toString", args=[node]), - ast.Constant(value=["true", "false"]), - ast.Constant(value=[True, False]), - ast.Constant(value=None), + ast.Call( + name="transform", + args=[ + ast.Call(name="toString", args=[node]), + ast.Constant(value=["true", "false"]), + ast.Constant(value=[1, 0]), + ast.Constant(value=None), + ], + ) ], ) return node diff --git a/posthog/hogql/transforms/test/__snapshots__/test_property_types.ambr b/posthog/hogql/transforms/test/__snapshots__/test_property_types.ambr index c0c2e1a610370..ee5bbaa8881f4 100644 --- a/posthog/hogql/transforms/test/__snapshots__/test_property_types.ambr +++ b/posthog/hogql/transforms/test/__snapshots__/test_property_types.ambr @@ -2,7 +2,7 @@ # name: TestPropertyTypes.test_data_warehouse_person_property_types ''' - SELECT persons__extended_properties.string_prop AS string_prop, persons__extended_properties.int_prop AS int_prop, transform(toString(persons__extended_properties.bool_prop), %(hogql_val_8)s, %(hogql_val_9)s, NULL) AS bool_prop + SELECT persons__extended_properties.string_prop AS string_prop, persons__extended_properties.int_prop AS int_prop, toBool(transform(toString(persons__extended_properties.bool_prop), %(hogql_val_8)s, %(hogql_val_9)s, NULL)) AS bool_prop FROM ( SELECT argMax(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person.properties, %(hogql_val_0)s), ''), 'null'), '^"|"$', ''), person.version) AS persons___properties___email, person.id AS id FROM person @@ -19,7 +19,7 @@ # name: TestPropertyTypes.test_group_boolean_property_types ''' - SELECT ifNull(equals(transform(toString(events__group_0.properties___group_boolean), %(hogql_val_2)s, %(hogql_val_3)s, NULL), 1), 0), ifNull(equals(transform(toString(events__group_0.properties___group_boolean), %(hogql_val_4)s, %(hogql_val_5)s, NULL), 0), 0), isNull(transform(toString(events__group_0.properties___group_boolean), %(hogql_val_6)s, %(hogql_val_7)s, NULL)) + SELECT ifNull(equals(toBool(transform(toString(events__group_0.properties___group_boolean), %(hogql_val_2)s, %(hogql_val_3)s, NULL)), 1), 0), ifNull(equals(toBool(transform(toString(events__group_0.properties___group_boolean), %(hogql_val_4)s, %(hogql_val_5)s, NULL)), 0), 0), isNull(toBool(transform(toString(events__group_0.properties___group_boolean), %(hogql_val_6)s, %(hogql_val_7)s, NULL))) FROM events LEFT JOIN ( SELECT argMax(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(groups.group_properties, %(hogql_val_0)s), ''), 'null'), '^"|"$', ''), toTimeZone(groups._timestamp, %(hogql_val_1)s)) AS properties___group_boolean, groups.group_type_index AS index, groups.group_key AS key FROM groups @@ -66,7 +66,7 @@ # name: TestPropertyTypes.test_resolve_property_types_event ''' - SELECT multiply(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, %(hogql_val_0)s), ''), 'null'), '^"|"$', ''), %(hogql_val_1)s), accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, %(hogql_val_2)s), ''), 'null'), '^"|"$', ''), %(hogql_val_3)s)), transform(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, %(hogql_val_4)s), ''), 'null'), '^"|"$', '')), %(hogql_val_5)s, %(hogql_val_6)s, NULL) AS bool + SELECT multiply(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, %(hogql_val_0)s), ''), 'null'), '^"|"$', ''), %(hogql_val_1)s), accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, %(hogql_val_2)s), ''), 'null'), '^"|"$', ''), %(hogql_val_3)s)), toBool(transform(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, %(hogql_val_4)s), ''), 'null'), '^"|"$', '')), %(hogql_val_5)s, %(hogql_val_6)s, NULL)) AS bool FROM events WHERE equals(events.team_id, 420) LIMIT 50000 diff --git a/posthog/hogql/transforms/test/test_property_types.py b/posthog/hogql/transforms/test/test_property_types.py index f27a24b8d7b9f..3fefac96b6b9a 100644 --- a/posthog/hogql/transforms/test/test_property_types.py +++ b/posthog/hogql/transforms/test/test_property_types.py @@ -136,7 +136,7 @@ def test_group_boolean_property_types(self): ) assert printed == self.snapshot assert ( - "SELECT ifNull(equals(transform(toString(events__group_0.properties___group_boolean), hogvar, hogvar, NULL), 1), 0), ifNull(equals(transform(toString(events__group_0.properties___group_boolean), hogvar, hogvar, NULL), 0), 0), isNull(transform(toString(events__group_0.properties___group_boolean), hogvar, hogvar, NULL))" + "SELECT ifNull(equals(toBool(transform(toString(events__group_0.properties___group_boolean), hogvar, hogvar, NULL)), 1), 0), ifNull(equals(toBool(transform(toString(events__group_0.properties___group_boolean), hogvar, hogvar, NULL)), 0), 0), isNull(toBool(transform(toString(events__group_0.properties___group_boolean), hogvar, hogvar, NULL)))" in re.sub(r"%\(hogql_val_\d+\)s", "hogvar", printed) ) diff --git a/posthog/hogql_queries/insights/funnels/base.py b/posthog/hogql_queries/insights/funnels/base.py index 1c7fb05d13f69..189bfab8b109a 100644 --- a/posthog/hogql_queries/insights/funnels/base.py +++ b/posthog/hogql_queries/insights/funnels/base.py @@ -37,7 +37,7 @@ ) from posthog.types import EntityNode, ExclusionEntityNode -JOIN_ALGOS = "direct,parallel_hash,hash,full_sorting_merge" +JOIN_ALGOS = "auto" class FunnelBase(ABC): diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation_actors_udf.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation_actors_udf.ambr index bc580c8b79bd9..dcec437b05683 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation_actors_udf.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation_actors_udf.ambr @@ -60,7 +60,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC')))), notIn(event.event, ['$pageview', 'insight analyzed']), equals(event.event, 'insight loaded'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -99,7 +99,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC')))), notIn(event.event, ['$pageview', 'insight analyzed']), equals(event.event, 'insight loaded'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id ORDER BY actor_id ASC) AS source))) @@ -192,7 +192,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC')))), notIn(event.event, ['$pageview', 'insight analyzed', 'insight updated']), equals(event.event, 'insight loaded'), ifNull(notEquals(funnel_actors.steps, 3), 1)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -231,7 +231,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC')))), notIn(event.event, ['$pageview', 'insight analyzed', 'insight updated']), equals(event.event, 'insight loaded'), ifNull(notEquals(funnel_actors.steps, 3), 1)) GROUP BY actor_id ORDER BY actor_id ASC) AS source))) @@ -325,7 +325,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -366,7 +366,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation_udf.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation_udf.ambr index 1ef2e20dafbba..0912fa7845d36 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation_udf.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation_udf.ambr @@ -56,7 +56,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(if(not(empty(event__override.distinct_id)), event__override.person_id, event.person_id), funnel_actors.actor_id) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), notIn(event.event, [])) GROUP BY name LIMIT 100 @@ -108,7 +108,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -171,7 +171,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors JOIN (SELECT persons.id AS id, persons.properties AS person_props @@ -236,7 +236,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -309,7 +309,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -350,7 +350,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) @@ -444,7 +444,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -485,7 +485,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) @@ -579,7 +579,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -620,7 +620,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) @@ -714,7 +714,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -755,7 +755,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) @@ -839,7 +839,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors JOIN (SELECT persons.id AS id, persons.properties AS person_props @@ -904,7 +904,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -977,7 +977,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -1018,7 +1018,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) @@ -1112,7 +1112,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -1153,7 +1153,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) @@ -1247,7 +1247,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -1288,7 +1288,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) @@ -1382,7 +1382,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -1423,7 +1423,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source))) @@ -1502,7 +1502,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_1`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_1`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), in(event.event, ['positively_related', 'negatively_related']))) GROUP BY name, prop @@ -1549,7 +1549,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -1607,7 +1607,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_1`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_1`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), in(event.event, ['positively_related', 'negatively_related']))) GROUP BY name, prop @@ -1654,7 +1654,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -1707,7 +1707,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), notIn(event.event, [])) GROUP BY name LIMIT 100 @@ -1752,7 +1752,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -1807,7 +1807,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'positively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -1874,7 +1874,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'positively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -1941,7 +1941,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2008,7 +2008,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2081,7 +2081,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), notIn(event.event, [])) GROUP BY name LIMIT 100 @@ -2134,7 +2134,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -2189,7 +2189,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2256,7 +2256,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2321,7 +2321,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), notIn(event.event, [])) GROUP BY name LIMIT 100 @@ -2366,7 +2366,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -2421,7 +2421,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'positively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2488,7 +2488,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'positively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2555,7 +2555,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2622,7 +2622,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2695,7 +2695,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), notIn(event.event, [])) GROUP BY name LIMIT 100 @@ -2748,7 +2748,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -2803,7 +2803,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2870,7 +2870,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 99999), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 99999), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id ORDER BY actor_id ASC) AS source @@ -2938,7 +2938,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -2995,7 +2995,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -3057,7 +3057,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -3131,7 +3131,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -3205,7 +3205,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -3279,7 +3279,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -3347,7 +3347,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -3404,7 +3404,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -3460,7 +3460,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -3517,7 +3517,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -3579,7 +3579,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -3653,7 +3653,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -3727,7 +3727,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -3801,7 +3801,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -3869,7 +3869,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -3926,7 +3926,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -3982,7 +3982,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -4039,7 +4039,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -4101,7 +4101,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -4175,7 +4175,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -4249,7 +4249,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -4323,7 +4323,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -4391,7 +4391,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -4448,7 +4448,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -4504,7 +4504,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -4561,7 +4561,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -4623,7 +4623,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -4697,7 +4697,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -4771,7 +4771,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -4845,7 +4845,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -4913,7 +4913,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -4970,7 +4970,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -5026,7 +5026,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -5083,7 +5083,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -5145,7 +5145,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -5219,7 +5219,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -5293,7 +5293,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -5367,7 +5367,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id ORDER BY funnel_actors.actor_id ASC) AS source @@ -5435,7 +5435,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LEFT JOIN (SELECT groups.key AS key, groups.properties AS properties @@ -5492,7 +5492,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS funnel_actors + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS funnel_actors LIMIT 100 SETTINGS readonly=2, max_execution_time=60, allow_experimental_object_type=1, diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_persons_udf.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_persons_udf.ambr index 370ed267d8b65..9fbd6af6c74ed 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_persons_udf.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_persons_udf.ambr @@ -44,7 +44,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -122,7 +122,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 1), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -200,7 +200,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(equals(step_reached, 1), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons_udf.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons_udf.ambr index 328abd6df2e65..846e534decf6a 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons_udf.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons_udf.ambr @@ -44,7 +44,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -122,7 +122,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 1), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -200,7 +200,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(equals(step_reached, 1), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_udf.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_udf.ambr index d869459cb3485..f0bbdae5329d3 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_udf.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_udf.ambr @@ -62,7 +62,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -143,7 +143,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -217,7 +217,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -299,7 +299,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -381,7 +381,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -470,7 +470,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -545,7 +545,7 @@ HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE and(ifNull(greaterOrEquals(step_reached, 0), 0), ifNull(equals(arrayFlatten(array(breakdown)), arrayFlatten(array('finance'))), isNull(arrayFlatten(array(breakdown))) and isNull(arrayFlatten(array('finance'))))) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -628,7 +628,7 @@ HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE and(ifNull(greaterOrEquals(step_reached, 1), 0), ifNull(equals(arrayFlatten(array(breakdown)), arrayFlatten(array('finance'))), isNull(arrayFlatten(array(breakdown))) and isNull(arrayFlatten(array('finance'))))) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -711,7 +711,7 @@ HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE and(ifNull(greaterOrEquals(step_reached, 0), 0), ifNull(equals(arrayFlatten(array(breakdown)), arrayFlatten(array('technology'))), isNull(arrayFlatten(array(breakdown))) and isNull(arrayFlatten(array('technology'))))) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -794,7 +794,7 @@ HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE and(ifNull(greaterOrEquals(step_reached, 1), 0), ifNull(equals(arrayFlatten(array(breakdown)), arrayFlatten(array('technology'))), isNull(arrayFlatten(array(breakdown))) and isNull(arrayFlatten(array('technology'))))) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_actors_udf.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_actors_udf.ambr index cb4021c05d56d..6e86eda210324 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_actors_udf.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_actors_udf.ambr @@ -42,7 +42,7 @@ GROUP BY aggregation_target SETTINGS date_time_output_format='iso', date_time_input_format='best_effort') WHERE and(ifNull(equals(success_bool, 1), 0), ifNull(equals(entrance_period_start, toDateTime64('2021-05-01 00:00:00.000000', 6, 'UTC')), 0)) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -118,7 +118,7 @@ GROUP BY aggregation_target SETTINGS date_time_output_format='iso', date_time_input_format='best_effort') WHERE and(ifNull(notEquals(success_bool, 1), 1), ifNull(equals(entrance_period_start, toDateTime64('2021-05-01 00:00:00.000000', 6, 'UTC')), 0)) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -194,7 +194,7 @@ GROUP BY aggregation_target SETTINGS date_time_output_format='iso', date_time_input_format='best_effort') WHERE and(ifNull(equals(success_bool, 1), 0), ifNull(equals(entrance_period_start, toDateTime64('2021-05-01 00:00:00.000000', 6, 'UTC')), 0)) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_udf.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_udf.ambr index b0b220a50a0bb..91bb45c0d1068 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_udf.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_udf.ambr @@ -41,7 +41,7 @@ GROUP BY entrance_period_start, data.breakdown ORDER BY entrance_period_start ASC - LIMIT 1000 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 1000 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -94,7 +94,7 @@ GROUP BY entrance_period_start, data.breakdown ORDER BY entrance_period_start ASC - LIMIT 1000 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 1000 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -147,7 +147,7 @@ GROUP BY entrance_period_start, data.breakdown ORDER BY entrance_period_start ASC - LIMIT 1000 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 1000 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_udf.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_udf.ambr index ea0939ad56226..cb6d8db14b8ce 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_udf.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_udf.ambr @@ -53,7 +53,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 100 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 100 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -105,7 +105,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 1), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT argMax(toTimeZone(person.created_at, 'UTC'), person.version) AS created_at, person.id AS id @@ -188,7 +188,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 100 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 100 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -270,7 +270,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 100 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 100 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -346,7 +346,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 100 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 100 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -409,7 +409,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 0), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT argMax(toTimeZone(person.created_at, 'UTC'), person.version) AS created_at, person.id AS id @@ -481,7 +481,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 1), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT argMax(toTimeZone(person.created_at, 'UTC'), person.version) AS created_at, person.id AS id @@ -553,7 +553,7 @@ GROUP BY aggregation_target HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE ifNull(greaterOrEquals(step_reached, 2), 0) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT argMax(toTimeZone(person.created_at, 'UTC'), person.version) AS created_at, person.id AS id @@ -633,7 +633,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 100 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 100 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -692,7 +692,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 100 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 100 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -766,7 +766,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -847,7 +847,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -921,7 +921,7 @@ GROUP BY breakdown ORDER BY step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -1003,7 +1003,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -1085,7 +1085,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -1174,7 +1174,7 @@ GROUP BY breakdown ORDER BY step_3 DESC, step_2 DESC, step_1 DESC) GROUP BY final_prop - LIMIT 26 SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge', + LIMIT 26 SETTINGS join_algorithm='auto', readonly=2, max_execution_time=60, allow_experimental_object_type=1, @@ -1249,7 +1249,7 @@ HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE and(ifNull(greaterOrEquals(step_reached, 0), 0), ifNull(equals(arrayFlatten(array(breakdown)), arrayFlatten(array('finance'))), isNull(arrayFlatten(array(breakdown))) and isNull(arrayFlatten(array('finance'))))) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -1332,7 +1332,7 @@ HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE and(ifNull(greaterOrEquals(step_reached, 1), 0), ifNull(equals(arrayFlatten(array(breakdown)), arrayFlatten(array('finance'))), isNull(arrayFlatten(array(breakdown))) and isNull(arrayFlatten(array('finance'))))) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -1415,7 +1415,7 @@ HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE and(ifNull(greaterOrEquals(step_reached, 0), 0), ifNull(equals(arrayFlatten(array(breakdown)), arrayFlatten(array('technology'))), isNull(arrayFlatten(array(breakdown))) and isNull(arrayFlatten(array('technology'))))) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person @@ -1498,7 +1498,7 @@ HAVING ifNull(greaterOrEquals(step_reached, 0), 0)) WHERE and(ifNull(greaterOrEquals(step_reached, 1), 0), ifNull(equals(arrayFlatten(array(breakdown)), arrayFlatten(array('technology'))), isNull(arrayFlatten(array(breakdown))) and isNull(arrayFlatten(array('technology'))))) - ORDER BY aggregation_target ASC SETTINGS join_algorithm='direct,parallel_hash,hash,full_sorting_merge') AS source + ORDER BY aggregation_target ASC SETTINGS join_algorithm='auto') AS source INNER JOIN (SELECT person.id AS id FROM person