Skip to content

Commit

Permalink
fix(insights): Fix deep filtering condition concat (#20180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes authored Feb 7, 2024
1 parent b03c494 commit b817a1b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion posthog/queries/funnels/funnel_event_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def get_query(
SELECT {all_fields}
FROM events {self.EVENT_TABLE_ALIAS}
{sample_clause}
{self._get_person_ids_query(relevant_events_conditions=entity_query + date_query)}
{self._get_person_ids_query(relevant_events_conditions=f"{entity_query} {date_query}")}
{person_query}
{groups_query}
{{extra_join}}
Expand Down
2 changes: 1 addition & 1 deletion posthog/queries/paths/paths_event_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_query(self) -> Tuple[str, Dict[str, Any]]:
query = f"""
SELECT {','.join(_fields)} FROM events {self.EVENT_TABLE_ALIAS}
{sample_clause}
{self._get_person_ids_query(relevant_events_conditions=self._get_event_query(deep_filtering=True)[0] + date_query)}
{self._get_person_ids_query(relevant_events_conditions=f"{self._get_event_query(deep_filtering=True)[0]} {date_query}")}
{person_query}
{groups_query}
{funnel_paths_join}
Expand Down
2 changes: 1 addition & 1 deletion posthog/queries/stickiness/stickiness_event_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_query(self) -> Tuple[str, Dict[str, Any]]:
) as num_intervals
FROM events {self.EVENT_TABLE_ALIAS}
{sample_clause}
{self._get_person_ids_query(relevant_events_conditions=entity_query + date_query)}
{self._get_person_ids_query(relevant_events_conditions=f"{entity_query} {date_query}")}
{person_query}
{groups_query}
WHERE team_id = %(team_id)s
Expand Down
2 changes: 1 addition & 1 deletion posthog/queries/trends/trends_event_query_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def get_query_base(self) -> Tuple[str, Dict[str, Any]]:
query = f"""
FROM events {self.EVENT_TABLE_ALIAS}
{sample_clause}
{self._get_person_ids_query(relevant_events_conditions=deep_entity_query + date_query)}
{self._get_person_ids_query(relevant_events_conditions=f"{deep_entity_query} {date_query}")}
{person_query}
{groups_query}
{session_query}
Expand Down

0 comments on commit b817a1b

Please sign in to comment.