diff --git a/posthog/hogql/database/schema/util/where_clause_extractor.py b/posthog/hogql/database/schema/util/where_clause_extractor.py index 4f0096af9ff53..c011355806fc1 100644 --- a/posthog/hogql/database/schema/util/where_clause_extractor.py +++ b/posthog/hogql/database/schema/util/where_clause_extractor.py @@ -501,7 +501,11 @@ def visit_alias(self, node: ast.Alias) -> bool: from posthog.hogql.database.schema.session_replay_events import RawSessionReplayEventsTable if node.type and isinstance(node.type, ast.FieldAliasType): - resolved_field = node.type.resolve_database_field(self.context) + try: + resolved_field = node.type.resolve_database_field(self.context) + except NotImplementedError: + return False + table_type = node.type.resolve_table_type(self.context) if not table_type: return False