dosubot[bot] commented on issue #23072:
URL: https://github.com/apache/superset/issues/23072#issuecomment-2973865839

   <!-- Answer -->
   The fix is to ensure that resampling (with imputation/filling) happens 
before applying the rolling calculation in the post-processing pipeline. In 
Superset, the order of these operations is determined by the post_processing 
list in the query object, which is constructed based on the order of controls 
in the chart's form data. Currently, there’s no built-in enforcement of the 
correct order—so if rolling is listed before resample, you get the incorrect 
"stepped" output you described. To fix this, you’d need to adjust the frontend 
(control panel or form data serialization) so that resample always comes before 
rolling for time series charts, or add backend validation to enforce this order 
automatically. There’s no evidence in the codebase or docs of any scenario 
where rolling-before-resample is preferred or required; the current behavior is 
just a side effect of not enforcing the canonical order, not an intentional 
feature or supported use case. The expected and mathematically
  correct sequence is always resample/fill, then rolling for time series 
analysis.  
   Sources:  
   - [QueryObject post-processing 
order](https://github.com/apache/superset/blob/8fd0fd673f3307ae2f7555272d68d8511651e685/superset/common/query_object.py)
  
   - [Frontend control panel 
config](https://github.com/apache/superset/blob/8fd0fd673f3307ae2f7555272d68d8511651e685/superset-frontend/src/explore/controlPanels/sections.tsx)
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/cf1ffb4a-23e5-4fbc-97a5-77a5d46068f2?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/cf1ffb4a-23e5-4fbc-97a5-77a5d46068f2?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/cf1ffb4a-23e5-4fbc-97a5-77a5d46068f2?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/cf1ffb4a-23e5-4fbc-97a5-77a5d46068f2?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/cf1ffb4a-23e5-4fbc-97a5-77a5d46068f2?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/cf1ffb4a-23e5-4fbc-97a5-77a5d46068f2?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/cf1ffb4a-23e5-4fbc-97a5-77a5d46068f2?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/23072)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to