From faa34165de0f11f24def603d225ea7123c7cb8b2 Mon Sep 17 00:00:00 2001 From: Ted Kaemming <65315+tkaemming@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:45:55 -0700 Subject: [PATCH] don't think these are needed either --- posthog/hogql/printer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posthog/hogql/printer.py b/posthog/hogql/printer.py index c0d86a882ff06..a0fcde59f386e 100644 --- a/posthog/hogql/printer.py +++ b/posthog/hogql/printer.py @@ -655,7 +655,7 @@ def resolve_field_type(expr: ast.Expr) -> ast.Type | None: return f"not({property_source.has_expr})" printed_expr = f"equals({property_source.value_expr}, {self.visit(constant_expr)})" - if constant_expr.value == "": # TODO: check type? + if constant_expr.value == "": # If we're comparing to an empty string literal, we need to disambiguate this from the default value # for the ``Map(String, String)`` type used for storing property group values by also ensuring that # the property key is present in the map. If this is in a ``WHERE`` clause, this also ensures we can @@ -701,7 +701,7 @@ def resolve_field_type(expr: ast.Expr) -> ast.Type | None: return None # only optimize constants for now, see above elif expr.value is None: node.right.exprs.remove(expr) - elif expr.value == "": # XXX: check type? + elif expr.value == "": default_value_expr = expr node.right.exprs.remove(expr) if len(node.right.exprs) > 0: