Move retention query generation into the compile look#61
Merged
Conversation
- 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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retention queries were a special case before, but this PR treats them like funnel or experiment queries.