refactor: create new queryopt package to target query plan optimizations#2970
refactor: create new queryopt package to target query plan optimizations#2970
queryopt package to target query plan optimizations#2970Conversation
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (74.84%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2970 +/- ##
===========================================
+ Coverage 48.86% 74.84% +25.99%
===========================================
Files 431 498 +67
Lines 54679 60781 +6102
===========================================
+ Hits 26714 45487 +18773
+ Misses 25251 12133 -13118
- Partials 2714 3161 +447 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| child := outline.SubOutlines[0] | ||
|
|
||
| // Do not push through IntersectionArrow (all() semantics require post-intersection caveat eval). | ||
| if child.Type == query.IntersectionArrowIteratorType { |
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, |
There was a problem hiding this comment.
is the ID the thing that is carrying the caveat+local context?
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