## 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
import json
from typing import List
from freezegun import freeze_time
from posthog.constants import TREND_FILTER_TYPE_EVENTS, TRENDS_BAR_VALUE, TRENDS_LIFECYCLE, TRENDS_TABLE
from posthog.models import (
    Action,
    ActionStep,
    Cohort,
    Entity,
    Event,
    Filter,
    Organization,
    Person,
)
from posthog.queries.abstract_test.test_interval import AbstractIntervalTest
from posthog.queries.abstract_test.test_timerange import AbstractTimerangeTest
from posthog.queries.trends import Trends, breakdown_label
from posthog.tasks.calculate_action import calculate_action, calculate_actions_from_last_calculation
from posthog.test.base import APIBaseTest, test_with_materialized_columns
from posthog.utils import generate_cache_key, relative_date_parse
def trend_test_factory(trends, event_factory, person_factory, action_factory, cohort_factory):
    class TestTrends(AbstractTimerangeTest, AbstractIntervalTest, APIBaseTest):
        maxDiff = None
        def _create_events(self, use_time=False):