Enhance Date Interval Handling and Add "Yesterday" Interval Support
Refs #3
Description:
This pull request introduces several improvements and new features:
1. Enhanced Date Interval Handling
- Refactor
intervalToSqlfunction to return both start and end interval SQL for better accuracy. - Update test cases to reflect changes in interval handling.
- Adjust various API calls to utilize both start and end interval SQL.
2. "Yesterday" Interval Support
- Add support for "yesterday" interval in analytics queries.
- Update relevant test cases to cover the new "yesterday" interval.
- Extend generateEmptyRowsOverInterval function to handle "yesterday" interval correctly.
- Modify the dashboard loader and UI to support the "yesterday" interval option.
Changes:
- Files Modified:
app/analytics/__tests__/query.test.tsapp/analytics/query.tsapp/routes/dashboard.tsxpackage-lock.json
Should I have made this on the v2 route?
Thanks for the PR. Sorry, I've been travelling for the past few weeks and haven't had an opportunity to review it.
Should I have made this on the v2 route?
Nope – you're good. That branch became main. I should delete it.
Going to merge this. As a follow on, IMO, the query should be both >= and <= on both start/end boundaries, but doubt second-level precision is going to matter to anyone.
Thank you @DylanPetrey!