diff --git a/posthog/hogql/printer.py b/posthog/hogql/printer.py index a77791034803c..f47c048a47ed8 100644 --- a/posthog/hogql/printer.py +++ b/posthog/hogql/printer.py @@ -1519,6 +1519,10 @@ def _is_nullable(self, node: ast.Expr) -> bool: return node.value is None elif isinstance(node.type, ast.PropertyType): return True + elif isinstance(node.type, ast.ConstantType): + return node.type.nullable + elif isinstance(node.type, ast.CallType): + return node.type.return_type.nullable elif isinstance(node.type, ast.FieldType): return node.type.is_nullable(self.context) elif isinstance(node, ast.Alias):