Skip to content

Conversation

zenador
Copy link
Contributor

@zenador zenador commented Sep 23, 2025

What this PR does

Make our unit testing of the pruning toggles more thorough by testing it as part of the query planner.

Just pruning toggles for now as the other new ones are applied as frontend middlewares.

Which issue(s) this PR fixes or relates to

Follow up to #12783 , waiting for that to be merged first.

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]. If changelog entry is not needed, please add the changelog-not-needed label to the PR.
  • about-versioning.md updated with experimental features.

Only updates tests, not user facing.

@zenador zenador requested a review from a team as a code owner September 23, 2025 02:56
@zenador zenador added the changelog-not-needed PRs that don't need a CHANGELOG.md entry label Sep 23, 2025
@zenador zenador marked this pull request as draft September 23, 2025 02:56
@zenador zenador requested a review from charleskorn September 23, 2025 02:56
@zenador zenador changed the base branch from main to zenador/fix-ast-opt-pass-step-invar-expr September 23, 2025 02:57
require.NoError(t, testutil.GatherAndCompare(g, strings.NewReader(expectedMetrics), metricNameTotal, metricNameChanged))
}

func TestPruneTogglesWithQueryPlan(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than introducing a new unit test for this, what if we changed the existing unit tests to follow this structure?

(and not just this optimisation pass, but all of them)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't make this change for reordering histograms and propagating matchers as those are currently frontend middlewares, not optimization passes, so can't be added to the query plan.

@zenador zenador force-pushed the zenador/test-ast-opt-pass-with-query-planner branch from f85c241 to d88cfef Compare September 23, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-not-needed PRs that don't need a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants