From 46dc9b12ff9cabeb1a0937f82eae3ab36b85890e Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 21 Mar 2024 14:13:42 -0400 Subject: [PATCH] assume timestamp type when defining expression --- posthog/hogql/database/database.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/posthog/hogql/database/database.py b/posthog/hogql/database/database.py index 6909211070e59..f0e614f6f8d1a 100644 --- a/posthog/hogql/database/database.py +++ b/posthog/hogql/database/database.py @@ -53,7 +53,6 @@ from posthog.models.team.team import WeekStartDay from posthog.schema import HogQLQueryModifiers, PersonsOnEventsMode - if TYPE_CHECKING: from posthog.models import Team @@ -211,7 +210,7 @@ def create_hogql_database( if "timestamp" not in tables[warehouse_modifier.table_name].fields.keys(): tables[warehouse_modifier.table_name].fields["timestamp"] = ExpressionField( name="timestamp", - expr=ast.Call(name="toDateTime", args=[ast.Field(chain=[warehouse_modifier.timestamp_field])]), + expr=ast.Field(chain=[warehouse_modifier.timestamp_field]), ) # TODO: Need to decide how the distinct_id and person_id fields are going to be handled