diff --git a/posthog/hogql/database/schema/person_distinct_ids.py b/posthog/hogql/database/schema/person_distinct_ids.py index 2fecbae4f5960..9ebfd9e17fde1 100644 --- a/posthog/hogql/database/schema/person_distinct_ids.py +++ b/posthog/hogql/database/schema/person_distinct_ids.py @@ -67,29 +67,6 @@ def join_with_person_distinct_ids_table( return join_expr -def join_data_warehouse_experiment_table_with_person_distinct_ids_table( - join_to_add: LazyJoinToAdd, - context: HogQLContext, - node: SelectQuery, -): - from posthog.hogql import ast - - if not join_to_add.fields_accessed: - raise ResolutionError("No fields requested from person_distinct_ids") - join_expr = ast.JoinExpr(table=select_from_person_distinct_ids_table(join_to_add.fields_accessed)) - join_expr.join_type = "LEFT JOIN" - join_expr.alias = join_to_add.to_table - join_expr.constraint = ast.JoinConstraint( - expr=ast.CompareOperation( - op=ast.CompareOperationOp.Eq, - left=ast.Field(chain=[join_to_add.from_table, *join_to_add.lazy_join.from_field]), - right=ast.Field(chain=[join_to_add.to_table, "distinct_id"]), - ), - constraint_type="ON", - ) - return join_expr - - class RawPersonDistinctIdsTable(Table): fields: dict[str, FieldOrTable] = { **PERSON_DISTINCT_IDS_FIELDS,