Skip to content

Commit

Permalink
feat: Remove max view depth as it only guarantees performance
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Aug 28, 2024
1 parent d4dced4 commit 623ba8e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions posthog/hogql/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class HogQLContext:
enable_select_queries: bool = False
# Do we apply a limit of MAX_SELECT_RETURNED_ROWS=10000 to the topmost select query?
limit_top_select: bool = True
# How many nested views do we support on this query? If `None`, no limit.
max_view_depth: int | None = 1
# Globals that will be resolved in the context of the query
globals: Optional[dict] = None

Expand Down
3 changes: 0 additions & 3 deletions posthog/hogql/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@ def visit_join_expr(self, node: ast.JoinExpr):
if isinstance(database_table, SavedQuery):
self.current_view_depth += 1

if self.context.max_view_depth is not None and self.current_view_depth > self.context.max_view_depth:
raise QueryError("Nested views are not supported")

node.table = parse_select(str(database_table.query))

if isinstance(node.table, ast.SelectQuery):
Expand Down

0 comments on commit 623ba8e

Please sign in to comment.