## 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
}
            filter = Filter(data=data)
            filter_2 = Filter(data={**data, "filter_test_accounts": "false",})
            filter_3 = Filter(data={**data, "breakdown": "key"})
            result = trends().run(filter, self.team,)
            self.assertEqual(result[0]["count"], 1)
            result = trends().run(filter_2, self.team,)
            self.assertEqual(result[0]["count"], 2)
            result = trends().run(filter_3, self.team,)
            self.assertEqual(result[0]["count"], 1)
        @test_with_materialized_columns(person_properties=["name"], verify_no_jsonextract=False)
        def test_filter_test_accounts_cohorts(self):
            person_factory(team_id=self.team.pk, distinct_ids=["person_1"], properties={"name": "John"})
            person_factory(team_id=self.team.pk, distinct_ids=["person_2"], properties={"name": "Jane"})
            event_factory(event="event_name", team=self.team, distinct_id="person_1")
            event_factory(event="event_name", team=self.team, distinct_id="person_2")
            event_factory(event="event_name", team=self.team, distinct_id="person_2")
            cohort = cohort_factory(
                team=self.team,
                name="cohort1",
                groups=[{"properties": [{"key": "name", "value": "Jane", "type": "person"}]}],
            )
            self.team.test_account_filters = [{"key": "id", "value": cohort.pk, "type": "cohort"}]
            self.team.save()
            response = trends().run(
                Filter(data={"events": [{"id": "event_name"}], "filter_test_accounts": True}), self.team,
            )
            self.assertEqual(response[0]["count"], 2)
            self.assertEqual(response[0]["data"][-1], 2)
        def test_bar_chart_by_value(self):