Skip to content
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

perf: Rewrite comparison operations that use property group values to support skip indices #24381

Merged
merged 57 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f71f39e
basic test cases
tkaemming Aug 9, 2024
1e8faf3
sketch out some of the different comparison operations that can be op…
tkaemming Aug 9, 2024
2ad2f57
more notes
tkaemming Aug 10, 2024
73f1184
move property group item to its own class
tkaemming Aug 19, 2024
5f7ca77
wip
tkaemming Aug 12, 2024
6764baf
only check once for disabled materialization
tkaemming Aug 12, 2024
a817a1e
working proof-of-concept -- need to check flipped operands as well as…
tkaemming Aug 12, 2024
f627b48
some edge cases via click testing
tkaemming Aug 12, 2024
842969f
tests
tkaemming Aug 13, 2024
65ae999
more improvements(?)
tkaemming Aug 13, 2024
b8a6c70
test all null variations
tkaemming Aug 13, 2024
4f0079d
make a note about what is not supported
tkaemming Aug 13, 2024
9b93285
tidy tests, add more notes
tkaemming Aug 13, 2024
2264408
remove dumb
tkaemming Aug 13, 2024
5fd13e1
clean up test cases
tkaemming Aug 19, 2024
8a37ad7
split up tests and use explain output
tkaemming Aug 13, 2024
6d63c25
make some of the names more descriptive and make search more robust
tkaemming Aug 13, 2024
80d35f3
note
tkaemming Aug 13, 2024
7b2adf2
more cases
tkaemming Aug 13, 2024
a2db774
optimize direct isNull/isNotNull calls
tkaemming Aug 13, 2024
f11f386
tests for in operator
tkaemming Aug 13, 2024
a08ff40
clean up test explanations
tkaemming Aug 14, 2024
301eae1
progress on IN
tkaemming Aug 14, 2024
ad19d12
more in support
tkaemming Aug 14, 2024
6305061
all important IN cases covered
tkaemming Aug 14, 2024
4ec92bc
note on nulls
tkaemming Aug 14, 2024
a3bdd67
remove comment that is no longer relevant
tkaemming Aug 14, 2024
da4c26e
always return explicit `None` to pacify type checker
tkaemming Aug 14, 2024
79012cd
more mypy appeasements
tkaemming Aug 14, 2024
66f8d44
improve a lot of docstrings and comments
tkaemming Aug 14, 2024
5a1297d
support different property group modes
tkaemming Aug 19, 2024
7d02bbd
add some more tests for things we _don't_ want to optimize
tkaemming Aug 14, 2024
4be9c05
revise name in test case
tkaemming Aug 19, 2024
675d8c5
wups, fix return type
tkaemming Aug 15, 2024
9cd57ab
break up test suites
tkaemming Aug 19, 2024
a6b238d
clean up tests a bit, improve coverage for NULL usage in IN
tkaemming Aug 19, 2024
a2fa034
improve tests when dealing with unoptimized properties
tkaemming Aug 15, 2024
699ca76
more details on null handling behavior
tkaemming Aug 15, 2024
680eba6
more notes on non-constant value handling
tkaemming Aug 15, 2024
3a280f1
add note about why aliases are tricky in expression optimization
tkaemming Aug 16, 2024
d987797
improve some names and comments for clarity
tkaemming Aug 20, 2024
af094db
Update posthog/hogql/printer.py
tkaemming Aug 26, 2024
4589382
Update UI snapshots for `chromium` (2)
github-actions[bot] Aug 26, 2024
135cfd1
apply same change as af094dbe69fe2349aea7c06a958f4996ba1e4fde to othe…
tkaemming Aug 26, 2024
240f2f7
remove (hopefully) unnecessary comments
tkaemming Aug 26, 2024
3cb47f2
clarify lack of alias resolution for now
tkaemming Aug 26, 2024
faa3416
don't think these are needed either
tkaemming Aug 26, 2024
5cdf2fa
try to better explain why we only optimize comparisons to constants
tkaemming Aug 26, 2024
cc3e30a
more tests and notes
tkaemming Aug 27, 2024
c0d9041
Update UI snapshots for `chromium` (1)
github-actions[bot] Aug 27, 2024
deb443a
Update UI snapshots for `chromium` (1)
github-actions[bot] Aug 27, 2024
21ce4fb
Update UI snapshots for `chromium` (2)
github-actions[bot] Aug 27, 2024
dbb4ebf
Update UI snapshots for `chromium` (2)
github-actions[bot] Aug 27, 2024
9ccba77
Update UI snapshots for `chromium` (1)
github-actions[bot] Aug 27, 2024
dc8a2e2
Update UI snapshots for `chromium` (1)
github-actions[bot] Aug 27, 2024
63442c9
Update UI snapshots for `chromium` (1)
github-actions[bot] Aug 27, 2024
759d68f
Merge branch 'master' into property-groups-reading-compare-optimization
tkaemming Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/queries/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5038,7 +5038,7 @@
"type": "string"
},
"propertyGroupsMode": {
"enum": ["enabled", "disabled"],
"enum": ["enabled", "disabled", "optimized"],
"type": "string"
},
"s3TableUseInvalidColumns": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/queries/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export interface HogQLQueryModifiers {
personsJoinMode?: 'inner' | 'left'
bounceRatePageViewMode?: 'count_pageviews' | 'uniq_urls' | 'uniq_page_screen_autocaptures'
sessionTableVersion?: 'auto' | 'v1' | 'v2'
propertyGroupsMode?: 'enabled' | 'disabled'
propertyGroupsMode?: 'enabled' | 'disabled' | 'optimized'
}

export interface DataWarehouseEventsModifier {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/debug/Modifiers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export function Modifiers<Q extends { response?: Record<string, any>; modifiers?
options={[
{ value: 'enabled', label: 'Enabled' },
{ value: 'disabled', label: 'Disabled' },
{ value: 'optimized', label: 'Enabled, with Optimizations' },
]}
onChange={(value) =>
setQuery({
Expand Down
Loading
Loading