-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(discover) Fix user.display in aggregates #20329
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
Conversation
Include the full column function in the group by clause so that we don't get errors about ungrouped fields. Refs SENTRY-GWT
Mostly remove the string formatting for ArgValue substitutions. Using ArgValue lets us expand function parameters into other expressions.
size-limit report
|
src/sentry/api/event_search.py
Outdated
| "count": { | ||
| "name": "count", | ||
| "args": [CountColumn("column")], | ||
| "args": [NoColumn("column")], |
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.
It's valid to have an empty args array here, unless the frontend is still passing through count() values with something inside the function call. Not sure why we need this new class.
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.
I can remove it. I was originally trying to make a class that swallowed the argument and didn't forward it, but that made other parts of function resolution angry. I'll remove it.
Co-authored-by: evanh <[email protected]>
Co-authored-by: Tony <[email protected]>
wmak
left a comment
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.
I've not removed string formatting of function arguments as @wmak is leaning on it in one of his open pull requests.
🙏
Fix a few issues that have come up around aggregates and the new user.display field.
count_unique()function requires an argument or it ends up with a None inside that makes snuba very sad.count_unique(user.display)expression now does the right thing. I've migrated most of the functions away from string formatting as it makes handling complex fields inside aggregates simpler. I've not removed string formatting of function arguments as @wmak is leaning on it in one of his open pull requests.