## 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
with freeze_time("2020-01-04"):
                response = trends().run(Filter(data={"actions": [{"id": 50000000}]}), self.team)
            self.assertEqual(len(response), 0)
            with freeze_time("2020-01-04"):
                response = trends().run(Filter(data={"events": [{"id": "DNE"}]}), self.team)
            self.assertEqual(response[0]["data"], [0, 0, 0, 0, 0, 0, 0, 0])
        @test_with_materialized_columns(person_properties=["email", "bar"])
        def test_trends_regression_filtering_by_action_with_person_properties(self):
            person1 = person_factory(
                team_id=self.team.pk, properties={"email": "foo@example.com", "bar": "aa"}, distinct_ids=["d1"]
            )
            person2 = person_factory(
                team_id=self.team.pk, properties={"email": "bar@example.com", "bar": "bb"}, distinct_ids=["d2"]
            )
            person2 = person_factory(
                team_id=self.team.pk, properties={"email": "efg@example.com", "bar": "ab"}, distinct_ids=["d3"]
            )
            person3 = person_factory(team_id=self.team.pk, properties={"bar": "aa"}, distinct_ids=["d4"])
            with freeze_time("2020-01-02 16:34:34"):
                event_factory(team=self.team, event="$pageview", distinct_id="d1")
                event_factory(team=self.team, event="$pageview", distinct_id="d2")
                event_factory(team=self.team, event="$pageview", distinct_id="d3")
                event_factory(team=self.team, event="$pageview", distinct_id="d4")
            event_filtering_action = Action.objects.create(team=self.team, name="$pageview from non-internal")
            ActionStep.objects.create(
                action=event_filtering_action,