Skip to content

Commit

Permalink
hotfix inner join person
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr committed Feb 23, 2024
1 parent 5b5e7ff commit a97f797
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1,711 deletions.
5 changes: 5 additions & 0 deletions posthog/hogql_queries/actors_query_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def source_id_column(self, source_query: ast.SelectQuery | ast.SelectUnionQuery)
raise ValueError("Source query must have an id column")

def source_table_join(self) -> ast.JoinExpr:
return ast.JoinExpr(table=self.source_query_runner.to_actors_query())

Check failure on line 139 in posthog/hogql_queries/actors_query_runner.py

View workflow job for this annotation

GitHub Actions / Python code quality checks

Item "None" of "QueryRunner | None" has no attribute "to_actors_query"
assert self.source_query_runner is not None # For type checking

Check failure on line 140 in posthog/hogql_queries/actors_query_runner.py

View workflow job for this annotation

GitHub Actions / Python code quality checks

Statement is unreachable
source_query = self.source_query_runner.to_actors_query()
source_id_chain = self.source_id_column(source_query)
Expand All @@ -158,6 +159,10 @@ def source_table_join(self) -> ast.JoinExpr:
)

def to_query(self) -> ast.SelectQuery:
return ast.SelectQuery(
select=[ast.Field(chain=["actor_id"])],
select_from=ast.JoinExpr(table=self.source_query_runner.to_actors_query()),

Check failure on line 164 in posthog/hogql_queries/actors_query_runner.py

View workflow job for this annotation

GitHub Actions / Python code quality checks

Item "None" of "QueryRunner | None" has no attribute "to_actors_query"
)
with self.timings.measure("columns"):

Check failure on line 166 in posthog/hogql_queries/actors_query_runner.py

View workflow job for this annotation

GitHub Actions / Python code quality checks

Statement is unreachable
columns = []
group_by = []
Expand Down
Loading

0 comments on commit a97f797

Please sign in to comment.