Use simple queries (no joins or groups) for fetching events and props#926
Use simple queries (no joins or groups) for fetching events and props#926
Conversation
0cfe236 to
f84a1fc
Compare
PR Review: Use simple queries for fetching events and propsThis is a clean refactor that replaces a complex dynamic pivot query with two straightforward queries. The approach is well-motivated and the implementation is solid. 1. Code Quality and Best PracticesNo issues found. The 2. Potential Bugs🔵 Minor — Props written concurrently during a long export may be silently dropped
event.props = propKeys
.filter((key) => eventProps[key] != null)
.map((key) => ({ key, value: eventProps[key] }))Any prop key that appears in 3. Performance Considerations🔵 Minor — Events table is scanned twice per page The props subquery re-runs the same cursor-filtered scan on 4. Security ConcernsNo issues found. 5. Test CoverageThe PR adds a solid pagination test that verifies both the count (20,002 events across three pages) and that props are correctly hydrated on every event. That covers the core logic changed here. Two minor branches remain uncovered (flagged by Codecov):
Neither is blocking, but a test with Overall: The refactor is well-motivated, cleanly implemented, and now has meaningful test coverage. The items above are all minor observations rather than blockers. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #926 +/- ##
===========================================
+ Coverage 97.59% 97.65% +0.06%
===========================================
Files 406 406
Lines 6652 6656 +4
Branches 882 885 +3
===========================================
+ Hits 6492 6500 +8
+ Misses 77 72 -5
- Partials 83 84 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f84a1fc to
1cabfec
Compare
No description provided.