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

[Metrics V2] Port Legacy metric tests and fixes #43094

Merged
merged 3 commits into from
May 23, 2024

Conversation

snoe
Copy link
Contributor

@snoe snoe commented May 23, 2024

Fixes #43093

Errors fixed:

  • Filters were being applied at stage -1 instead of 0 when splicing in compatible source-table metrics.
  • When joining to a saved question that used a metric, a malli error would cause the preprocess to fail.

@snoe snoe added the .Team/QueryProcessor :hammer_and_wrench: label May 23, 2024
@snoe snoe requested a review from a team May 23, 2024 20:11
@snoe snoe self-assigned this May 23, 2024
@snoe snoe requested a review from camsaul as a code owner May 23, 2024 20:11
Copy link
Contributor

@metamben metamben left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines 80 to 81
(let [metadata-type (case macro-type
:metric :metadata/legacy-metric
:segment :metadata/segment)]
Copy link
Contributor

Choose a reason for hiding this comment

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

This will look quite surprising to the uninitiated.

Comment on lines 381 to 386
{:keys [before after]} {:before {:source-table (meta/id :venues)
:aggregation [[:metric (:id source-metric)]]}
:after {:source-table (meta/id :venues)
:aggregation [[:aggregation-options [:sum [:field (meta/id :venues :price) {}]]
{:display-name "My Cool Aggregation"}]]
:filter [:= [:field (meta/id :venues :name) {}] [:value "abc" {}]]}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just define before and after separately?

@snoe snoe added the no-backport Do not backport this PR to any branch label May 23, 2024
Copy link

replay-io bot commented May 23, 2024

Status Complete ↗︎
Commit 4b79619
Results
⚠️ 4 Flaky
2572 Passed

@snoe snoe merged commit 5ad73d6 into master May 23, 2024
123 of 129 checks passed
@snoe snoe deleted the metrics-v2-legacy-metric-qp-cleanup branch May 23, 2024 22:39
Copy link

@snoe Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport Do not backport this PR to any branch .Team/QueryProcessor :hammer_and_wrench:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Query Processor legacy metric expansion and port legacy metric tests
2 participants