Skip to content

Commit

Permalink
fix(insights): use UInt8 instead of Boolean for conditions in funnels (
Browse files Browse the repository at this point in the history
…#23437)

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
skoob13 and github-actions[bot] authored Jul 3, 2024
1 parent 4f9de4d commit d0824fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion posthog/hogql_queries/insights/funnels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def _build_step_query(
raise NotImplementedError("DataWarehouseNode is not supported in funnels")
elif entity.event is None:
# all events
event_expr = ast.Constant(value=True)
event_expr = ast.Constant(value=1)
else:
# event
event_expr = parse_expr("event = {event}", {"event": ast.Constant(value=entity.event)})
Expand Down
12 changes: 6 additions & 6 deletions posthog/hogql_queries/insights/funnels/test/test_funnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3742,9 +3742,9 @@ def test_smoke(self):
(SELECT
e.timestamp AS timestamp,
person_id AS aggregation_target,
if(true, 1, 0) AS step_0,
if(1, 1, 0) AS step_0,
if(equals(step_0, 1), timestamp, NULL) AS latest_0,
if(true, 1, 0) AS step_1,
if(1, 1, 0) AS step_1,
if(equals(step_1, 1), timestamp, NULL) AS latest_1
FROM
events AS e
Expand Down Expand Up @@ -3802,9 +3802,9 @@ def test_smoke(self):
(SELECT
e.timestamp AS timestamp,
person_id AS aggregation_target,
if(true, 1, 0) AS step_0,
if(1, 1, 0) AS step_0,
if(equals(step_0, 1), timestamp, NULL) AS latest_0,
if(true, 1, 0) AS step_1,
if(1, 1, 0) AS step_1,
if(equals(step_1, 1), timestamp, NULL) AS latest_1
FROM
events AS e
Expand Down Expand Up @@ -3873,9 +3873,9 @@ def test_smoke(self):
(SELECT
e.timestamp AS timestamp,
person_id AS aggregation_target,
if(true, 1, 0) AS step_0,
if(1, 1, 0) AS step_0,
if(equals(step_0, 1), timestamp, NULL) AS latest_0,
if(true, 1, 0) AS step_1,
if(1, 1, 0) AS step_1,
if(equals(step_1, 1), timestamp, NULL) AS latest_1
FROM
events AS e
Expand Down

0 comments on commit d0824fe

Please sign in to comment.