Skip to content

Commit

Permalink
perf: Use max_bytes_before_external_group_by for funnels and path que… (
Browse files Browse the repository at this point in the history
#23022)

* perf: Use max_bytes_before_external_group_by for funnels and path queries

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* fix test

* also do retention query

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
timgl and github-actions[bot] authored Jun 18, 2024
1 parent 5ec6d44 commit 6fd86f7
Show file tree
Hide file tree
Showing 34 changed files with 1,098 additions and 574 deletions.
96 changes: 64 additions & 32 deletions posthog/api/test/__snapshots__/test_query.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_event_property_filter.1
Expand All @@ -38,7 +39,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_event_property_filter.2
Expand All @@ -59,7 +61,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_event_property_filter_materialized
Expand All @@ -80,7 +83,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_event_property_filter_materialized.1
Expand All @@ -101,7 +105,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_event_property_filter_materialized.2
Expand All @@ -122,7 +127,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_events_query_all_time_date
Expand All @@ -139,7 +145,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_events_query_all_time_date.1
Expand All @@ -156,7 +163,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_events_query_all_time_date.2
Expand All @@ -173,7 +181,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_full_hogql_query
Expand All @@ -192,7 +201,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_full_hogql_query_async
Expand Down Expand Up @@ -236,7 +246,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_full_hogql_query_view
Expand All @@ -255,7 +266,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_full_hogql_query_view.1
Expand All @@ -278,7 +290,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_hogql_property_filter
Expand All @@ -299,7 +312,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_hogql_property_filter.1
Expand All @@ -320,7 +334,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_hogql_property_filter.2
Expand All @@ -341,7 +356,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_hogql_property_filter.3
Expand All @@ -362,7 +378,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_hogql_property_filter_materialized
Expand All @@ -383,7 +400,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_hogql_property_filter_materialized.1
Expand All @@ -404,7 +422,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_hogql_property_filter_materialized.2
Expand All @@ -425,7 +444,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_hogql_property_filter_materialized.3
Expand All @@ -446,7 +466,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_person_property_filter
Expand Down Expand Up @@ -485,7 +506,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_person_property_filter_materialized
Expand Down Expand Up @@ -524,7 +546,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_property_filter_aggregations
Expand All @@ -543,7 +566,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_property_filter_aggregations.1
Expand All @@ -563,7 +587,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_property_filter_aggregations_materialized
Expand All @@ -582,7 +607,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_property_filter_aggregations_materialized.1
Expand All @@ -602,7 +628,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_select_event_person
Expand All @@ -621,7 +648,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_select_hogql_expressions
Expand All @@ -641,7 +669,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_select_hogql_expressions.1
Expand All @@ -659,7 +688,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_select_hogql_expressions.2
Expand All @@ -678,7 +708,8 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
# name: TestQuery.test_select_hogql_expressions.3
Expand All @@ -697,6 +728,7 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
format_csv_allow_double_quotes=0,
max_ast_elements=1000000,
max_expanded_ast_elements=1000000,
max_query_size=524288
max_query_size=524288,
max_bytes_before_external_group_by=0
'''
# ---
Loading

0 comments on commit 6fd86f7

Please sign in to comment.