Skip to content

Commit

Permalink
assume timestamp type when defining expression
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE committed Mar 21, 2024
1 parent 08acfba commit 46dc9b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions posthog/hogql/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 46dc9b1

Please sign in to comment.