feat: add support for fill modifiers in binary operations#62
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #62 +/- ##
==========================================
- Coverage 89.69% 89.57% -0.13%
==========================================
Files 11 11
Lines 2969 3069 +100
==========================================
+ Hits 2663 2749 +86
- Misses 209 216 +7
- Partials 97 104 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Thanks for the pull request, it looks good!
Just two things:
-
the fill modifiers should not work with
and,or,unless(existing operators in PromQL), since the whole point of those operators is to filter series based on their presence or absence, nor withif,ifnot,default(new operators in MetricsQL).
So in parseExpr(), the checkis not sufficient to determine whetherLines 71 to 74 in a808ea4
parseFillModifieris legitimate , a new sub-op check seems needed. -
the optimizer check for binary expression must also consider fill modifier.
part of VictoriaMetrics/VictoriaMetrics#10598
Summary by cubic
Added support for fill modifiers (fill, fill_left, fill_right) in binary operations to set default values when one side is missing. This expands query syntax and improves control over join behavior.
Written for commit 14411c8. Summary will update on new commits.