Skip to content

Commit

Permalink
version in
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Apr 16, 2024
1 parent 29e0da1 commit d1213de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions posthog/hogql/transforms/in_cohort.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,10 @@ def _add_join_for_cohort(
else:
sql = "(SELECT person_id, 1 as matched FROM raw_cohort_people WHERE cohort_id = {cohort_id} GROUP BY person_id, cohort_id, version HAVING sum(sign) > 0)"
subquery = parse_expr(
sql, {"cohort_id": ast.Constant(value=cohort_id)}, start=None
) # clear the source start position
sql,
{"cohort_id": ast.Constant(value=cohort_id), "version": ast.Constant(value=version)},
start=None, # clear the source start position
)

new_join = ast.JoinExpr(
alias=f"in_cohort__{cohort_id}",
Expand Down

0 comments on commit d1213de

Please sign in to comment.