## 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
person_factory(team_id=self.team.pk, distinct_ids=["person1"], properties={"email": "test@posthog.com"})
            person_factory(team_id=self.team.pk, distinct_ids=["person2"], properties={"email": "test@gmail.com"})
            event_factory(event="sign up", distinct_id="person1", team=self.team, properties={"key": "val"})
            event_factory(event="sign up", distinct_id="person2", team=self.team, properties={"key": "val"})
            response = trends().run(
                Filter(
                    data={
                        "date_from": "-14d",
                        "breakdown": "email",
                        "breakdown_type": "person",
                        "events": [{"id": "sign up", "name": "sign up", "type": "events", "order": 0}],
                        "properties": [
                            {"key": "email", "value": "@posthog.com", "operator": "not_icontains", "type": "person"},
                            {"key": "key", "value": "val"},
                        ],
                    }
                ),
                self.team,
            )
            self.assertEqual(len(response), 1)
            self.assertEqual(response[0]["breakdown_value"], "test@gmail.com")
        @test_with_materialized_columns(["key"])
        def test_breakdown_with_filter(self):