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(