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

fix(discover): Handle field aliases with others correctly #28751

Merged
merged 2 commits into from
Sep 23, 2021

Conversation

wmak
Copy link
Member

@wmak wmak commented Sep 21, 2021

  • The Other query doesn't include any selected columns which means that
    using the FIELD_ALIAS's alias won't have a corresponding column
  • This fixes that issue by pulling the column from the selected columns
    and uses it in the conditions

- The Other query doesn't include any selected columns which means that
  using the FIELD_ALIAS's alias won't have a corresponding column
- This fixes that issue by pulling the column from the selected columns
  and uses it in the conditions
@wmak wmak requested a review from a team September 21, 2021 22:35
@wmak wmak requested a review from a team as a code owner September 21, 2021 22:35
Comment on lines -644 to -646
elif field in FIELD_ALIASES:
snuba_filter.conditions.append([field, "IN", values])
other_conditions.append([field, "NOT IN", values])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The block above to generate resolved_field means this is no longer needed

@wmak wmak enabled auto-merge (squash) September 23, 2021 15:38
@wmak wmak merged commit 8723901 into master Sep 23, 2021
@wmak wmak deleted the wmak/fix/user-display-and-other branch September 23, 2021 15:38
vuluongj20 pushed a commit that referenced this pull request Sep 30, 2021
* fix(discover): Handle field aliases with others correctly

- The Other query doesn't include any selected columns which means that
  using the FIELD_ALIAS's alias won't have a corresponding column
- This fixes that issue by pulling the column from the selected columns
  and uses it in the conditions
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2021
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.

2 participants