## Bug description

Sentry error: https://sentry.io/organizations/posthog/issues/2588698757/events/62db81be9cbe44638988eda3dc72ad8c/?project=1899813

## Expected behavior

Don't fail

## How to reproduce

1. Create an action with a person filter (e.g. `User Signed Up (self-hosted)` on cloud)
2. Try to graph that action
3. See no results, error in backend

## Environment

- [x] PostHog Cloud
- [ ] self-hosted PostHog (ClickHouse-based), version/commit: _please provide_
- [ ] self-hosted PostHog (Postgres-based, legacy), version/commit: _please provide_

## Additional context

`ClickhouseEventQuery._determine_should_join_persons` does not resolve action type entity properties. Rather than do it there we can likely piggy-back off of `ColumnOptimizer` here.

#### *Thank you* for your bug report – we love squashing them!

posthog/queries/test/test_trends.py
self._test_math_property_aggregation("median", values=range(101, 201), expected_value=150)
        @test_with_materialized_columns(["some_number"])
        def test_p90_filtering(self):
            self._test_math_property_aggregation("p90", values=range(101, 201), expected_value=190)
        @test_with_materialized_columns(["some_number"])
        def test_p95_filtering(self):
            self._test_math_property_aggregation("p95", values=range(101, 201), expected_value=195)
        @test_with_materialized_columns(["some_number"])
        def test_p99_filtering(self):
            self._test_math_property_aggregation("p99", values=range(101, 201), expected_value=199)
        @test_with_materialized_columns(["some_number"])
        def test_avg_filtering_non_number_resiliency(self):
            sign_up_action, person = self._create_events()
            person_factory(team_id=self.team.pk, distinct_ids=["someone_else"])
            event_factory(team=self.team, event="sign up", distinct_id="someone_else", properties={"some_number": 2})
            event_factory(team=self.team, event="sign up", distinct_id="someone_else", properties={"some_number": "x"})
            event_factory(team=self.team, event="sign up", distinct_id="someone_else", properties={"some_number": None})
            event_factory(team=self.team, event="sign up", distinct_id="someone_else", properties={"some_number": 8})
            calculate_actions_from_last_calculation()
            action_response = trends().run(
                Filter(data={"actions": [{"id": sign_up_action.id, "math": "avg", "math_property": "some_number"}]}),
                self.team,
            )
            event_response = trends().run(
                Filter(data={"events": [{"id": "sign up", "math": "avg", "math_property": "some_number"}]}), self.team
            )
            self.assertEqual(action_response[0]["data"][-1], 5)
            self.assertEntityResponseEqual(action_response, event_response)
        @test_with_materialized_columns(["$some_property"])
        def test_per_entity_filtering(self):