fix: extend zero-fill resampling to the full query time range - #42678
fix: extend zero-fill resampling to the full query time range#42678AadityaAnand wants to merge 3 commits into
Conversation
Code Review Agent Run #e75cf8Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #42678 +/- ##
==========================================
- Coverage 65.54% 65.47% -0.07%
==========================================
Files 2819 2815 -4
Lines 160372 160043 -329
Branches 36617 36473 -144
==========================================
- Hits 105111 104785 -326
+ Misses 53206 53192 -14
- Partials 2055 2066 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #efdee5Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Summary
This PR fixes an issue where enabling Resample to zero only generated zero-filled buckets between the first and last data points returned by the query, rather than across the entire selected query time range.
The implementation propagates the resolved query time boundaries (from_dttm and to_dttm) into the pandas post-processing resampling step. When zero-fill resampling is enabled, the resampling now generates buckets for the full query time range, filling any missing intervals with 0.
Changes
Root Cause
The existing implementation relied on pandas.DataFrame.resample(...).asfreq(fill_value=0), which only generates buckets between the first and last timestamps present in the data. As a result, leading and trailing gaps within the selected query time range were never filled.
Testing