Skip to content

Conversation

@markstory
Copy link
Member

Fix a few issues that have come up around aggregates and the new user.display field.

  • The count_unique() function requires an argument or it ends up with a None inside that makes snuba very sad.
  • The 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.

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.
@markstory markstory requested review from evanh and wmak August 21, 2020 00:15
@markstory markstory requested a review from a team as a code owner August 21, 2020 00:15
@github-actions
Copy link
Contributor

size-limit report

Path Size
public/app.js 207.64 KB (0%)
public/vendor.js 441.59 KB (0%)

"count": {
"name": "count",
"args": [CountColumn("column")],
"args": [NoColumn("column")],
Copy link
Member

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.

Copy link
Member Author

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.

@vercel vercel bot temporarily deployed to Preview August 21, 2020 15:07 Inactive
@vercel vercel bot temporarily deployed to Preview August 21, 2020 15:09 Inactive
Copy link
Member

@wmak wmak left a 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.

🙏

@markstory markstory merged commit 3b3e6a9 into master Aug 24, 2020
@markstory markstory deleted the fix/user-display-with-aggregate branch August 24, 2020 13:58
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants