refactor: create new queryopt package to target query plan optimizations#2970
Merged
refactor: create new queryopt package to target query plan optimizations#2970
queryopt package to target query plan optimizations#2970Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2970 +/- ##
==========================================
- Coverage 74.83% 74.80% -0.02%
==========================================
Files 497 497
Lines 60621 60656 +35
==========================================
+ Hits 45359 45367 +8
- Misses 12103 12126 +23
- Partials 3159 3163 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
miparnisari
previously approved these changes
Mar 12, 2026
| child := outline.SubOutlines[0] | ||
|
|
||
| // Do not push through IntersectionArrow (all() semantics require post-intersection caveat eval). | ||
| if child.Type == query.IntersectionArrowIteratorType { |
Member
There was a problem hiding this comment.
As an improvement for the future, it might be worth add an .Is(...) onto the child that takes in one or more types, and returns true if any match
| Type: query.CaveatIteratorType, | ||
| Args: outline.Args, | ||
| SubOutlines: []query.Outline{sub}, | ||
| ID: originalID, |
Member
There was a problem hiding this comment.
is the ID the thing that is carrying the caveat+local context?
90a93cb to
9e52f5b
Compare
miparnisari
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Before, optimize.go lived in
pkg/queryand worked on iterator trees. With the introduction of Outlines, it's much more convenient to work on Outlines before compiling an iterator tree.This creates the new package framework, registry, and ports the existing optimize files, deleting the old ones.
Testing
Testing ported to new package