Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hogql): move default execution time to 120sec #21212

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions posthog/api/test/__snapshots__/test_query.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -29,7 +29,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -46,7 +46,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -63,7 +63,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -80,7 +80,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -97,7 +97,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -110,7 +110,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -123,7 +123,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -136,7 +136,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -151,7 +151,7 @@
ORDER BY toTimeZone(events.timestamp, 'UTC') ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand Down Expand Up @@ -191,7 +191,7 @@
ORDER BY toTimeZone(events.timestamp, 'UTC') ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -206,7 +206,7 @@
ORDER BY toTimeZone(events.timestamp, 'UTC') ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -225,7 +225,7 @@
ORDER BY toTimeZone(events.timestamp, 'UTC') ASC) AS event_view
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -242,7 +242,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -259,7 +259,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -276,7 +276,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -293,7 +293,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -310,7 +310,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -327,7 +327,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -344,7 +344,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -361,7 +361,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand Down Expand Up @@ -396,7 +396,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand Down Expand Up @@ -431,7 +431,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -446,7 +446,7 @@
ORDER BY count() DESC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -462,7 +462,7 @@
ORDER BY count() DESC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -477,7 +477,7 @@
ORDER BY count() DESC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -493,7 +493,7 @@
ORDER BY count() DESC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -508,7 +508,7 @@
ORDER BY events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -524,7 +524,7 @@
ORDER BY replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'key'), ''), 'null'), '^"|"$', '') ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -538,7 +538,7 @@
ORDER BY tuple(events.uuid, events.event, events.properties, toTimeZone(events.timestamp, 'UTC'), events.team_id, events.distinct_id, events.elements_chain, toTimeZone(events.created_at, 'UTC')) ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -553,7 +553,7 @@
ORDER BY count() DESC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -568,7 +568,7 @@
ORDER BY count() DESC, events.event ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
2 changes: 1 addition & 1 deletion posthog/hogql/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ class HogQLQuerySettings(BaseModel):
class HogQLGlobalSettings(HogQLQuerySettings):
model_config = ConfigDict(extra="forbid")
readonly: Optional[int] = 2
max_execution_time: Optional[int] = 60
max_execution_time: Optional[int] = 120
allow_experimental_object_type: Optional[bool] = True
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
ORDER BY persons.id ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -137,7 +137,7 @@
GROUP BY session_replay_events.session_id) AS session_replay_events
WHERE ifNull(in(session_replay_events.session_id, ['s1']), 0)
LIMIT 100 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand Down Expand Up @@ -265,7 +265,7 @@
ORDER BY persons.id ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -279,7 +279,7 @@
GROUP BY session_replay_events.session_id) AS session_replay_events
WHERE ifNull(in(session_replay_events.session_id, ['s2']), 0)
LIMIT 100 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand Down Expand Up @@ -407,7 +407,7 @@
ORDER BY persons.id ASC
LIMIT 101
OFFSET 0 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand All @@ -421,7 +421,7 @@
GROUP BY session_replay_events.session_id) AS session_replay_events
WHERE ifNull(in(session_replay_events.session_id, ['s2']), 0)
LIMIT 100 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@
WHERE isNotNull(step_runs.step_1_average_conversion_time_inner)) AS histogram_params), 0), 1)) AS numbers) AS fill ON equals(results.bin_from_seconds, fill.bin_from_seconds)
ORDER BY fill.bin_from_seconds ASC
LIMIT 100 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand Down Expand Up @@ -752,7 +752,7 @@
WHERE isNotNull(step_runs.step_1_average_conversion_time_inner)) AS histogram_params), 0), 1)) AS numbers) AS fill ON equals(results.bin_from_seconds, fill.bin_from_seconds)
ORDER BY fill.bin_from_seconds ASC
LIMIT 100 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Expand Down Expand Up @@ -1494,7 +1494,7 @@
WHERE isNotNull(step_runs.step_1_average_conversion_time_inner)) AS histogram_params), 0), 1)) AS numbers) AS fill ON equals(results.bin_from_seconds, fill.bin_from_seconds)
ORDER BY fill.bin_from_seconds ASC
LIMIT 100 SETTINGS readonly=2,
max_execution_time=60,
max_execution_time=120,
allow_experimental_object_type=1
'''
# ---
Loading
Loading