(self)
| 74 | return f"m{self.index}" |
| 75 | |
| 76 | def _condition(self) -> str: |
| 77 | # Post-exposure attribution lives in conditional aggregation, not JOIN ON: |
| 78 | # ClickHouse 24.8 rejects ON clauses mixing left+right columns in an |
| 79 | # inequality (error 403). |
| 80 | return ( |
| 81 | f"m.event = %(metric_{self.index}_event)s" |
| 82 | f" AND m.timestamp >= e.first_exposure" |
| 83 | ) |
| 84 | |
| 85 | def unit_select(self) -> str: |
| 86 | """Per-identity expression for the unit_values CTE SELECT.""" |