Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
aspicer committed Dec 4, 2024
1 parent 5e9ae64 commit bc0bcad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions posthog/hogql/functions/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ def compare_types(arg_types: list[ConstantType], sig_arg_types: tuple[ConstantTy
((DateTimeType(), StringType()), StringType()),
],
),
"toBool": HogQLFunctionMeta("toBool", 1, 1),
"toJSONString": HogQLFunctionMeta("toJSONString", 1, 1),
"parseDateTime": HogQLFunctionMeta("parseDateTimeOrNull", 2, 3, tz_aware=True),
"parseDateTimeBestEffort": HogQLFunctionMeta("parseDateTime64BestEffortOrNull", 1, 2, tz_aware=True),
Expand Down
15 changes: 10 additions & 5 deletions posthog/hogql/transforms/property_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,17 @@ def _field_type_to_property_call(self, node: ast.Field, field_type: str):
return ast.Call(name="toFloat", args=[node])
if field_type == "Boolean":
return ast.Call(
name="transform",
name="toBool",
args=[
ast.Call(name="toString", args=[node]),
ast.Constant(value=["true", "false"]),
ast.Constant(value=[True, False]),
ast.Constant(value=None),
ast.Call(
name="transform",
args=[
ast.Call(name="toString", args=[node]),
ast.Constant(value=["true", "false"]),
ast.Constant(value=[1, 0]),
ast.Constant(value=None),
],
)
],
)
return node
Expand Down
2 changes: 1 addition & 1 deletion posthog/hogql_queries/insights/funnels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
)
from posthog.types import EntityNode, ExclusionEntityNode

JOIN_ALGOS = "direct,parallel_hash,hash,full_sorting_merge"
JOIN_ALGOS = "auto"


class FunnelBase(ABC):
Expand Down

0 comments on commit bc0bcad

Please sign in to comment.