-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix(insights): Opportunity score forward browser name filter #83078
Conversation
1fd7c0a
to
89096c1
Compare
@@ -1796,11 +1796,28 @@ def _resolve_total_score_weights_function(self, column: str, alias: str | None) | |||
if column in self.total_score_weights and self.total_score_weights[column] is not None: | |||
return Function("toFloat64", [self.total_score_weights[column]], alias) | |||
|
|||
# Pull out browser.name filters from the query | |||
parsed_terms = parse_search_query(self.builder.query) | |||
query = " ".join( |
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.
Not sure if theres a cleaner way to do this, or if theres some function that already exists.
This code is to pull out any browser.name
filters that exist on the original query, including those that are wrapped by parenthesis.
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'm not familiar with any existing functions to do what you're doing with pulling the browser.name
predicates out of the query, but the code you've got seems reasonable enough 👍
- Updates opportunity score function to forward `browser.name` query filter to secondary helper query
browser.name
query filter to secondary helper queryrevised #82967
The previous pr was forwarding all query filters including those of type
AggregateFilter
, which causes the query to have a "having" clause which is unsupported. Updates to only forwardbrowser.name
to support the browser filter in the webvitals module ui.