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: limit xrays on agg models to source fields #44863

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

snoe
Copy link
Contributor

@snoe snoe commented Jun 28, 2024

Fixes #43793

  1. table-like? was checking aggregations but not breakouts. This meant that legacy metric definitions would try to apply to the second stage which is generally illegal and would cause things like implicit joins to come in where they make no sense.
  2. Trying to bin a count metric-like model would give a bin span of 0.0 which would blow up those questions.
  3. Trying to self reference breakout fields, in the precense of a question's aggregation meant that most fields would not be exposed to the next stage and should be ignored. (similar to 1.)

Fixes #43793

1. `table-like?` was checking aggregations but not breakouts. This meant
   that legacy metric definitions would try to apply to the second stage
   which is generally illegal and would cause things like implicit joins
   to come in where they make no sense.
2. Trying to bin a `count` metric-like model would give a bin span of
   0.0 which would blow up those questions.
3. Trying to self reference breakout fields, in the precense of a
   question's  aggregation meant that most fields would not be exposed to
   the next stage and should be ignored. (similar to 1.)
@snoe snoe added backport Automatically create PR on current release branch on merge .Team/QueryProcessor :hammer_and_wrench: labels Jun 28, 2024
@snoe snoe requested a review from a team June 28, 2024 02:47
@snoe snoe self-assigned this Jun 28, 2024
@snoe snoe requested a review from camsaul as a code owner June 28, 2024 02:47
Copy link

replay-io bot commented Jun 28, 2024

Status Complete ↗︎
Commit 77af7f9
Results
⚠️ 5 Flaky
2716 Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/QueryProcessor :hammer_and_wrench:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

firing an x-ray made of aggregated fields will generate bad wrong queries
1 participant