-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow hogql property queries in replay filtering #26176
Changes from 1 commit
f1d1551
416c61b
055f2c3
d3d8c2f
7b35837
b630acd
3b82878
9f5b54c
647faa9
1454b13
00794a3
438c075
29de030
54a0650
57b6cda
1a77a19
efcfad2
62f2a63
3c49ecc
8b5c8ea
baff95e
4ef52fd
cde6c10
d0ddf24
8ca0f80
d773d9a
65e2688
d249602
ff64984
54cc559
bdc85dc
143dc6b
1f35120
f892a49
7b12a52
2b6a2c2
6d9eae2
e809757
0653b9f
d8db5df
d48679b
e478f7a
e26c8be
763f7e5
3a75e57
3b6c293
07d4ac7
9db36ed
48788e3
9e45158
ee74de6
32f0ef1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
import { actionsModel } from '~/models/actionsModel' | ||
import { cohortsModel } from '~/models/cohortsModel' | ||
import { AndOrFilterSelect } from '~/queries/nodes/InsightViz/PropertyGroupFilters/AndOrFilterSelect' | ||
import { NodeKind } from '~/queries/schema' | ||
import { RecordingUniversalFilters, UniversalFiltersGroup } from '~/types' | ||
|
||
import { DurationFilter } from './DurationFilter' | ||
|
@@ -109,6 +110,8 @@ | |
TaxonomicFilterGroupType.Cohorts, | ||
TaxonomicFilterGroupType.PersonProperties, | ||
TaxonomicFilterGroupType.SessionProperties, | ||
TaxonomicFilterGroupType.FeatureFlags, | ||
TaxonomicFilterGroupType.HogQLExpression, | ||
]} | ||
onChange={(filterGroup) => setFilters({ filter_group: filterGroup })} | ||
> | ||
|
@@ -144,6 +147,7 @@ | |
onRemove={() => removeGroupValue(index)} | ||
onChange={(value) => replaceGroupValue(index, value)} | ||
initiallyOpen={allowInitiallyOpen} | ||
metadataSource={{ kind: NodeKind.RecordingsQuery }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need something here to correct the autocomplete There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need a query runner in python for the recordings query |
||
/> | ||
) | ||
})} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import { loaders } from 'kea-loaders' | |
import { actionToUrl, router, urlToAction } from 'kea-router' | ||
import { subscriptions } from 'kea-subscriptions' | ||
import api from 'lib/api' | ||
import { isAnyPropertyfilter } from 'lib/components/PropertyFilters/utils' | ||
import { isAnyPropertyfilter, isHogQLPropertyFilter } from 'lib/components/PropertyFilters/utils' | ||
import { DEFAULT_UNIVERSAL_GROUP_FILTER } from 'lib/components/UniversalFilters/universalFiltersLogic' | ||
import { | ||
isActionFilter, | ||
|
@@ -120,6 +120,8 @@ export function convertUniversalFiltersToRecordingsQuery(universalFilters: Recor | |
actions.push(f) | ||
} else if (isLogEntryPropertyFilter(f)) { | ||
console_log_filters.push(f) | ||
} else if (isHogQLPropertyFilter(f)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this "just works"™ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this work for all property types e.g person & event properties? Wondering if the subqueries in the runner affect things here in any way There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it works for hogql... am going to ignore everything else for now 🤣 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would be more worried about it not working for folks without PoE enabled (but maybe that's everyone now) |
||
properties.push(f) | ||
} else if (isAnyPropertyfilter(f)) { | ||
if (isRecordingPropertyFilter(f)) { | ||
if (f.key === 'visited_page') { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hogql property filters don't have an item so this needs to be slightly safer