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 b7424dc3d9eb6..8662e9ff2dd98 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 @@ -8,11 +8,11 @@ data.breakdown AS prop FROM (SELECT arraySort(t -> t.1, groupArray(tuple(accurateCastOrNull(timestamp, 'Float64'), toUInt64(toDateTime(toStartOfDay(timestamp), 'UTC')), uuid, [], arrayFilter(x -> ifNull(notEquals(x, 0), 1), [multiply(1, step_0), multiply(2, step_1), multiply(3, step_2)])))) AS events_array, - arrayJoin(aggregate_funnel_array_trends_v3(0, 3, 1209600, 'first_touch', 'ordered', [[]], arrayFilter((x, x_before, x_after) -> not(and(ifNull(lessOrEquals(length(x.5), 1), 0), ifNull(equals(x.5, x_before.5), isNull(x.5) - and isNull(x_before.5)), ifNull(equals(x.5, x_after.5), isNull(x.5) - and isNull(x_after.5)), ifNull(equals(x.4, x_before.4), isNull(x.4) - and isNull(x_before.4)), ifNull(equals(x.4, x_after.4), isNull(x.4) - and isNull(x_after.4)), ifNull(greater(x.1, x_before.1), 0), ifNull(less(x.1, x_after.1), 0))), events_array, arrayRotateRight(events_array, 1), arrayRotateLeft(events_array, 1)))) AS af_tuple, + arrayJoin(aggregate_funnel_array_trends(0, 3, 1209600, 'first_touch', 'ordered', [[]], arrayFilter((x, x_before, x_after) -> not(and(ifNull(lessOrEquals(length(x.5), 1), 0), ifNull(equals(x.5, x_before.5), isNull(x.5) + and isNull(x_before.5)), ifNull(equals(x.5, x_after.5), isNull(x.5) + and isNull(x_after.5)), ifNull(equals(x.4, x_before.4), isNull(x.4) + and isNull(x_before.4)), ifNull(equals(x.4, x_after.4), isNull(x.4) + and isNull(x_after.4)), ifNull(greater(x.1, x_before.1), 0), ifNull(less(x.1, x_after.1), 0))), events_array, arrayRotateRight(events_array, 1), arrayRotateLeft(events_array, 1)))) AS af_tuple, toTimeZone(toDateTime(toUInt64(af_tuple.1), 'UTC'), 'UTC') AS entrance_period_start, af_tuple.2 AS success_bool, af_tuple.3 AS breakdown, @@ -60,11 +60,11 @@ data.breakdown AS prop FROM (SELECT arraySort(t -> t.1, groupArray(tuple(accurateCastOrNull(timestamp, 'Float64'), toUInt64(toDateTime(toStartOfDay(timestamp), 'US/Pacific')), uuid, [], arrayFilter(x -> ifNull(notEquals(x, 0), 1), [multiply(1, step_0), multiply(2, step_1), multiply(3, step_2)])))) AS events_array, - arrayJoin(aggregate_funnel_array_trends_v3(0, 3, 1209600, 'first_touch', 'ordered', [[]], arrayFilter((x, x_before, x_after) -> not(and(ifNull(lessOrEquals(length(x.5), 1), 0), ifNull(equals(x.5, x_before.5), isNull(x.5) - and isNull(x_before.5)), ifNull(equals(x.5, x_after.5), isNull(x.5) - and isNull(x_after.5)), ifNull(equals(x.4, x_before.4), isNull(x.4) - and isNull(x_before.4)), ifNull(equals(x.4, x_after.4), isNull(x.4) - and isNull(x_after.4)), ifNull(greater(x.1, x_before.1), 0), ifNull(less(x.1, x_after.1), 0))), events_array, arrayRotateRight(events_array, 1), arrayRotateLeft(events_array, 1)))) AS af_tuple, + arrayJoin(aggregate_funnel_array_trends(0, 3, 1209600, 'first_touch', 'ordered', [[]], arrayFilter((x, x_before, x_after) -> not(and(ifNull(lessOrEquals(length(x.5), 1), 0), ifNull(equals(x.5, x_before.5), isNull(x.5) + and isNull(x_before.5)), ifNull(equals(x.5, x_after.5), isNull(x.5) + and isNull(x_after.5)), ifNull(equals(x.4, x_before.4), isNull(x.4) + and isNull(x_before.4)), ifNull(equals(x.4, x_after.4), isNull(x.4) + and isNull(x_after.4)), ifNull(greater(x.1, x_before.1), 0), ifNull(less(x.1, x_after.1), 0))), events_array, arrayRotateRight(events_array, 1), arrayRotateLeft(events_array, 1)))) AS af_tuple, toTimeZone(toDateTime(toUInt64(af_tuple.1), 'US/Pacific'), 'US/Pacific') AS entrance_period_start, af_tuple.2 AS success_bool, af_tuple.3 AS breakdown, @@ -112,11 +112,11 @@ data.breakdown AS prop FROM (SELECT arraySort(t -> t.1, groupArray(tuple(accurateCastOrNull(timestamp, 'Float64'), toUInt64(toDateTime(toStartOfWeek(timestamp, 0), 'UTC')), uuid, [], arrayFilter(x -> ifNull(notEquals(x, 0), 1), [multiply(1, step_0), multiply(2, step_1), multiply(3, step_2)])))) AS events_array, - arrayJoin(aggregate_funnel_array_trends_v3(0, 3, 1209600, 'first_touch', 'ordered', [[]], arrayFilter((x, x_before, x_after) -> not(and(ifNull(lessOrEquals(length(x.5), 1), 0), ifNull(equals(x.5, x_before.5), isNull(x.5) - and isNull(x_before.5)), ifNull(equals(x.5, x_after.5), isNull(x.5) - and isNull(x_after.5)), ifNull(equals(x.4, x_before.4), isNull(x.4) - and isNull(x_before.4)), ifNull(equals(x.4, x_after.4), isNull(x.4) - and isNull(x_after.4)), ifNull(greater(x.1, x_before.1), 0), ifNull(less(x.1, x_after.1), 0))), events_array, arrayRotateRight(events_array, 1), arrayRotateLeft(events_array, 1)))) AS af_tuple, + arrayJoin(aggregate_funnel_array_trends(0, 3, 1209600, 'first_touch', 'ordered', [[]], arrayFilter((x, x_before, x_after) -> not(and(ifNull(lessOrEquals(length(x.5), 1), 0), ifNull(equals(x.5, x_before.5), isNull(x.5) + and isNull(x_before.5)), ifNull(equals(x.5, x_after.5), isNull(x.5) + and isNull(x_after.5)), ifNull(equals(x.4, x_before.4), isNull(x.4) + and isNull(x_before.4)), ifNull(equals(x.4, x_after.4), isNull(x.4) + and isNull(x_after.4)), ifNull(greater(x.1, x_before.1), 0), ifNull(less(x.1, x_after.1), 0))), events_array, arrayRotateRight(events_array, 1), arrayRotateLeft(events_array, 1)))) AS af_tuple, toTimeZone(toDateTime(toUInt64(af_tuple.1), 'UTC'), 'UTC') AS entrance_period_start, af_tuple.2 AS success_bool, af_tuple.3 AS breakdown, diff --git a/posthog/user_scripts/v1/aggregate_funnel b/posthog/user_scripts/v1/aggregate_funnel deleted file mode 100755 index e62dd751484cb..0000000000000 --- a/posthog/user_scripts/v1/aggregate_funnel +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -DIR_NAME=$(dirname "$0") - -case $( uname -m ) in -aarch64) $DIR_NAME/aggregate_funnel_aarch64 "$@";; -*) $DIR_NAME/aggregate_funnel_x86_64 "$@";; -esac - diff --git a/posthog/user_scripts/v1/aggregate_funnel_aarch64 b/posthog/user_scripts/v1/aggregate_funnel_aarch64 deleted file mode 100755 index aabb3ff28f7cd..0000000000000 Binary files a/posthog/user_scripts/v1/aggregate_funnel_aarch64 and /dev/null differ diff --git a/posthog/user_scripts/v1/aggregate_funnel_array_trends_test.py b/posthog/user_scripts/v1/aggregate_funnel_array_trends_test.py deleted file mode 100755 index cf6ab4e33741b..0000000000000 --- a/posthog/user_scripts/v1/aggregate_funnel_array_trends_test.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/python3 - -import sys -import json - -if __name__ == "__main__": - for line in sys.stdin: - try: - print(json.dumps({"result": line})) # noqa: T201 - # calculate_funnel_trends_from_user_events(*parse_args(line)) - except Exception as e: - print(json.dumps({"result": json.dumps(str(e))}), end="\n") # noqa: T201 - sys.stdout.flush() diff --git a/posthog/user_scripts/v1/aggregate_funnel_test.py b/posthog/user_scripts/v1/aggregate_funnel_test.py deleted file mode 100755 index 1eae7c9f36914..0000000000000 --- a/posthog/user_scripts/v1/aggregate_funnel_test.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/python3 -import json - -import sys -import traceback - -if __name__ == "__main__": - for line in sys.stdin: - try: - # calculate_funnel_from_user_events(*parse_args(line)) - print(json.dumps({"result": line})) # noqa: T201 - except Exception as e: - print(json.dumps({"result": json.dumps(str(e) + traceback.format_exc())}), end="\n") # noqa: T201 - sys.stdout.flush() diff --git a/posthog/user_scripts/v1/aggregate_funnel_x86_64 b/posthog/user_scripts/v1/aggregate_funnel_x86_64 deleted file mode 100755 index 8eb41e8979bf2..0000000000000 Binary files a/posthog/user_scripts/v1/aggregate_funnel_x86_64 and /dev/null differ diff --git a/posthog/user_scripts/v1/user_defined_function.xml b/posthog/user_scripts/v1/user_defined_function.xml deleted file mode 100644 index 42e4452293452..0000000000000 --- a/posthog/user_scripts/v1/user_defined_function.xml +++ /dev/null @@ -1,882 +0,0 @@ - - - executable_pool - aggregate_funnel - Array(Tuple(Int8, Nullable(String), Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Nullable(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) - value - - JSONEachRow - aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_cohort - Array(Tuple(Int8, UInt64, Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(UInt64) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, UInt64, Array(Int8))) - value - - JSONEachRow - aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_array - Array(Tuple(Int8, Array(String), Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Array(String), Array(Int8))) - value - - JSONEachRow - aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_test - String - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) - value - - JSONEachRow - aggregate_funnel_test.py - 600 - - - - executable_pool - aggregate_funnel_trends - Array(Tuple(UInt64, Int8, Nullable(String))) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Nullable(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Nullable(String), Array(Int8))) - value - - JSONEachRow - aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_array_trends - - Array(Tuple(UInt64, Int8, Array(String))) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Array(String), Array(Int8))) - value - - JSONEachRow - aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_cohort_trends - - Array(Tuple(UInt64, Int8, UInt64)) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(UInt64) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, UInt64, Array(Int8))) - value - - JSONEachRow - aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_array_trends_test - String - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Array(String), Array(Int8))) - value - - JSONEachRow - aggregate_funnel_array_trends_test.py - 600 - - - executable_pool - aggregate_funnel_v0 - Array(Tuple(Int8, Nullable(String), Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Nullable(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) - value - - JSONEachRow - v0/aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_cohort_v0 - Array(Tuple(Int8, UInt64, Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(UInt64) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, UInt64, Array(Int8))) - value - - JSONEachRow - v0/aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_array_v0 - Array(Tuple(Int8, Array(String), Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Array(String), Array(Int8))) - value - - JSONEachRow - v0/aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_test_v0 - String - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) - value - - JSONEachRow - v0/aggregate_funnel_test.py - 600 - - - - executable_pool - aggregate_funnel_trends_v0 - Array(Tuple(UInt64, Int8, Nullable(String))) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Nullable(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Nullable(String), Array(Int8))) - value - - JSONEachRow - v0/aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_array_trends_v0 - - Array(Tuple(UInt64, Int8, Array(String))) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Array(String), Array(Int8))) - value - - JSONEachRow - v0/aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_cohort_trends_v0 - - Array(Tuple(UInt64, Int8, UInt64)) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(UInt64) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, UInt64, Array(Int8))) - value - - JSONEachRow - v0/aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_array_trends_test_v0 - String - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Array(String), Array(Int8))) - value - - JSONEachRow - v0/aggregate_funnel_array_trends_test.py - 600 - - - executable_pool - aggregate_funnel_v1 - Array(Tuple(Int8, Nullable(String), Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Nullable(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) - value - - JSONEachRow - v1/aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_cohort_v1 - Array(Tuple(Int8, UInt64, Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(UInt64) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, UInt64, Array(Int8))) - value - - JSONEachRow - v1/aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_array_v1 - Array(Tuple(Int8, Array(String), Array(Float64), Array(Array(UUID)))) - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Array(String), Array(Int8))) - value - - JSONEachRow - v1/aggregate_funnel steps - 600 - - - - executable_pool - aggregate_funnel_test_v1 - String - result - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UUID, Nullable(String), Array(Int8))) - value - - JSONEachRow - v1/aggregate_funnel_test.py - 600 - - - - executable_pool - aggregate_funnel_trends_v1 - Array(Tuple(UInt64, Int8, Nullable(String))) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Nullable(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Nullable(String), Array(Int8))) - value - - JSONEachRow - v1/aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_array_trends_v1 - - Array(Tuple(UInt64, Int8, Array(String))) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Array(String), Array(Int8))) - value - - JSONEachRow - v1/aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_cohort_trends_v1 - - Array(Tuple(UInt64, Int8, UInt64)) - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(UInt64) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, UInt64, Array(Int8))) - value - - JSONEachRow - v1/aggregate_funnel trends - 600 - - - - executable_pool - aggregate_funnel_array_trends_test_v1 - String - result - - UInt8 - from_step - - - UInt8 - num_steps - - - UInt64 - conversion_window_limit - - - String - breakdown_attribution_type - - - String - funnel_order_type - - - Array(Array(String)) - prop_vals - - - Array(Tuple(Nullable(Float64), UInt64, Array(String), Array(Int8))) - value - - JSONEachRow - v1/aggregate_funnel_array_trends_test.py - 600 - - \ No newline at end of file