From 915cc19cc442dd40dab68e83644e526734512d48 Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Wed, 17 Apr 2024 16:32:52 +0200 Subject: [PATCH] and a test (this errored before) --- .../util/test/test_session_where_clause_extractor.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/posthog/hogql/database/schema/util/test/test_session_where_clause_extractor.py b/posthog/hogql/database/schema/util/test/test_session_where_clause_extractor.py index 55078df6ef4d4..cd1ffee7b0158 100644 --- a/posthog/hogql/database/schema/util/test/test_session_where_clause_extractor.py +++ b/posthog/hogql/database/schema/util/test/test_session_where_clause_extractor.py @@ -200,6 +200,15 @@ def test_less_function_second_arg(self): expected = f("((raw_sessions.min_timestamp + toIntervalDay(3)) >= today())") assert expected == actual + def test_subquery_args(self): + actual = f( + self.inliner.get_inner_where( + parse("SELECT * FROM sessions WHERE true = (select false) and less(today(), min_timestamp)") + ) + ) + expected = f("((raw_sessions.min_timestamp + toIntervalDay(3)) >= today())") + assert expected == actual + def test_real_example(self): actual = f( self.inliner.get_inner_where(