sadpandajoe commented on code in PR #42678:
URL: https://github.com/apache/superset/pull/42678#discussion_r3822342697
##########
superset/utils/pandas_postprocessing/resample.py:
##########
@@ -47,7 +78,30 @@ def resample(
)
if method == "asfreq" and fill_value is not None:
- _df = df.resample(rule).asfreq(fill_value=fill_value)
+ aligned_start = _align_time_range_tz(time_range_start, df.index)
+ aligned_end = _align_time_range_tz(time_range_end, df.index)
+ origin = aligned_start if aligned_start is not None else "start_day"
Review Comment:
When a query begins off the rule's normal grid (for example `00:15` with
hourly source points at `01:00`), using that boundary as `origin` makes
`asfreq()` drop the real points and returns only zero buckets at `00:15`,
`01:15`, and `02:15`. Could this preserve the existing resample grid and extend
a compatible fill index instead, with an unaligned-bound regression test?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]