You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move retention query generation into the compile look (#61)
* Refactor retention query generation to use compile-down pattern
- Add retention case to CustomQuery.QueryType enum
- Create CustomQuery+Retention.swift with precompiledRetentionQuery() method
- Integrate retention query compilation into precompile() flow
- Change CustomQuery.granularity from let to var to allow mutation
- Update tests to verify both new and legacy approaches work
This brings retention queries in line with funnel and experiment queries,
using the same compile-down pattern for consistency.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Remove legacy RetentionQueryGenerator
- Delete RetentionQueryGenerator.swift as functionality moved to CustomQuery+Retention
- Update tests to use new compile-down approach exclusively
- Remove references to legacy generateRetentionQuery method
The retention query generation now fully uses the compile-down pattern,
consistent with funnel and experiment queries.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Add granularity support to retention query generation
- Retention period now determined by query's granularity property
- Support day, week, month, quarter, and year retention periods
- Add validation for minimum intervals based on granularity
- Implement generic interval splitting for all supported granularities
- Add comprehensive tests for different retention granularities
The retention query now respects the granularity setting instead of
always using monthly retention, providing more flexibility for different
retention analysis periods.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
0 commit comments