Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(hogql): fix json pushdown argMax assertions (#65568)

Raúl Negrón-Oteroef4a6ee23b82
diff --git a/posthog/hogql/transforms/test/test_json_property_pushdown.py b/posthog/hogql/transforms/test/test_json_property_pushdown.py
index 3570e3ff2b38..91f920469010 100644
--- a/posthog/hogql/transforms/test/test_json_property_pushdown.py
+++ b/posthog/hogql/transforms/test/test_json_property_pushdown.py
@@ -26,12 +26,12 @@ class TestJSONPropertyPushdown(BaseTest):
def test_whole_properties_access_still_aggregates_blob(self):
printed = self._print("SELECT key, properties FROM groups")
- self.assertIn("argMax(tuple(groups.group_properties)", printed)
+ self.assertIn("argMax(groups.group_properties,", printed)
self.assertNotIn("properties___name", printed)
def test_non_constant_key_is_not_rewritten(self):
printed = self._print("SELECT key, JSONExtractString(properties, key) AS name FROM groups")
- self.assertIn("argMax(tuple(groups.group_properties)", printed)
+ self.assertIn("argMax(groups.group_properties,", printed)
def test_does_not_rewrite_on_hogql_dialect(self):
context = HogQLContext(team_id=self.team.pk, enable_select_queries=True)