0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
4306444c2e
Fix issue with person breakdowns and clashing params (#5815)
* Fix issue with person breakdowns and clashing params

Closes https://github.com/PostHog/posthog/issues/5814

Another PR https://github.com/PostHog/posthog/pull/5807 also fixes this
(incidentally) but this fix won't hurt it + adds a regression test.

* Autoimport Property into shell_plus to speed up debugging

* Remove index
2021-09-07 13:36:14 +03:00
Karl-Aksel Puulmann
35813b3b49
Refactor breakdowns to work with materialized person columns (#5807)
* Make breakdown join with person if needed

* Refactor trends to be purely class-based, don't rely on wonky inheritance

* Extract method

* Improve person join behavior

* Remove unneeded parameter

* Mark a function thats always passed as such

* Add test case demonstrating previous non-join case

* Unify two get_breakdown_prop_values methods

* Add test for materialized columns

* Simplify trends breakdown query

* Unify _breakdown_prop_params for events/person breakdowns

* Use shared column_optimizer

* Typing fix

* Cleanup

* Code style cleanup

* Code style cleanup

* Fix param ordering
2021-09-07 09:05:13 +03:00
Eric Duong
4ac73045de
add missing table name in query (#5781) 2021-09-01 13:51:33 -04:00
Karl-Aksel Puulmann
a8a33251a9
Use materialized person properties in trends & funnels (#5705)
* ColumnOptimizer: Add functionality for person materialized columns

* WIP: Use person properties in trends/funnels

* Test person materialized props in trends cohort breakdown query

* Make use of materialized person properties in breakdowns

* Mark some cases working with materialized columns

* Test and fix breakdown by person props without filtering

* Make filtering by entity/person props on a join work better

By not assuming everything is under `properties`

* Add test case around breakdown with person properties

* Add test cases around materialization

* Add another materialization test

* Test cohorts and fix breakdowns with person filter

This exposes a limitation in the current implementation

* Fix some cohort tests

* Fix event query tests

* Get a funnel materialized column test running

* Cover more funnel breakdown tests with materialized

* Handle person property breakdowns in funnels

* Fixup funnel typo

* Add tests, fix an indentation issue

* TestFunnelPersons with materialized columns

* Test funnels against actions with person filters

* Add failing test for entity filtering failing

* Add test case for filtering with entity properties

* Show my 'broken' test is actually doing a subquery

* Resolve linting issues
2021-08-26 18:00:49 +00:00
Michael Matloka
4e02411eda
Fix fetching event-based breakdown values with LIMIT (#5496)
* Fix fetching event-based breakdown values with `LIMIT`

* Improve test comment

* Limit prop clauses inclusion to breakdown queries

* Address feedback partly

* Fix imports

* Remove non-3.7-compatible `Literal`

* Don't try to import `Literal`

* Fix oversight

* Always include prop filters in `get_entity_filtering_params`

* Revert "Always include prop filters in `get_entity_filtering_params`"

This reverts commit 4f61edd19a.

* Add and test handling of actions in addition to events

* Update test_funnel.py

* Move new tests to `breakdown_cases`
2021-08-20 16:48:00 +02:00