From 0136a5008e370390647230921e8f279f78dcc876 Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Tue, 18 Apr 2023 12:19:31 +0200 Subject: [PATCH] array --- posthog/hogql/test/test_resolver.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/posthog/hogql/test/test_resolver.py b/posthog/hogql/test/test_resolver.py index 2fa15d27531c4..0c59117d8204f 100644 --- a/posthog/hogql/test/test_resolver.py +++ b/posthog/hogql/test/test_resolver.py @@ -631,15 +631,17 @@ def test_resolve_union_all(self): def test_call_type(self): node = parse_select("select max(timestamp) from events") resolve_types(node, self.database) - expected = ast.Call( - name="max", - # NB! timestamp was resolved to a DateTimeType for the Call's arg type. - type=ast.CallType(name="max", arg_types=[ast.DateTimeType()], return_type=ast.UnknownType()), - args=[ - ast.Field( - chain=["timestamp"], - type=ast.FieldType(name="timestamp", table_type=ast.TableType(table=self.database.events)), - ) - ], - ) - self.assertEqual(node.select[0], expected) + expected = [ + ast.Call( + name="max", + # NB! timestamp was resolved to a DateTimeType for the Call's arg type. + type=ast.CallType(name="max", arg_types=[ast.DateTimeType()], return_type=ast.UnknownType()), + args=[ + ast.Field( + chain=["timestamp"], + type=ast.FieldType(name="timestamp", table_type=ast.TableType(table=self.database.events)), + ) + ], + ), + ] + self.assertEqual(node.select, expected)