Skip to content

feat: add support for fill modifiers in binary operations#62

Open
andriibeee wants to merge 1 commit intoVictoriaMetrics:masterfrom
andriibeee:fill-modifiers
Open

feat: add support for fill modifiers in binary operations#62
andriibeee wants to merge 1 commit intoVictoriaMetrics:masterfrom
andriibeee:fill-modifiers

Conversation

@andriibeee
Copy link
Copy Markdown

@andriibeee andriibeee commented Mar 5, 2026

fix 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.

  • New Features
    • Parser recognizes fill, fill_left, and fill_right modifiers with numeric values, including negatives, inf, and NaN.
    • fill(x) sets both FillLeft and FillRight; fill_left(x) and fill_right(x) set sides independently.
    • Works alongside existing on()/group_* modifiers and is treated as a reserved identifier.
    • Output formatting includes the fill modifiers via appendModifiers.
    • Added tests for case-insensitive syntax, value parsing, and normalization.

Written for commit 14411c8. Summary will update on new commits.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 76.11940% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.39%. Comparing base (0dc0e2d) to head (14411c8).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
parser.go 73.33% 8 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   89.69%   89.39%   -0.31%     
==========================================
  Files          11       11              
  Lines        2969     3035      +66     
==========================================
+ Hits         2663     2713      +50     
- Misses        209      217       +8     
- Partials       97      105       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MetricsQL: add support for fill(), fill_left() and fill_right() modifiers

2 participants