AmoghAtreya commented on code in PR #42609:
URL: https://github.com/apache/superset/pull/42609#discussion_r3688266760


##########
superset/common/query_object.py:
##########
@@ -536,5 +536,28 @@ def exec_post_processing(self, df: DataFrame) -> DataFrame:
                         )
                     )
                 options = post_process.get("options", {})
+                if operation == "resample":
+                    options = self._resolve_resample_options(options)
                 df = getattr(pandas_postprocessing, operation)(df, **options)

Review Comment:
   Just verified and looked this over. Modifying the global semantic layer 
execution (result.df.empty check in query_object.py) is out of scope for this 
chart-specific PR to prevent unintended regression risks across other 
post-processing operations.
   
   However, I have updated resample() to ensure that when an empty DataFrame is 
provided alongside explicit time range bounds (time_range_start and 
time_range_end), it properly expands into the expected zero-filled time buckets 
while preserving the DatetimeIndex. I've also added unit test coverage in 
test_resample.py for both bounded and unbounded empty DataFrames



-- 
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]

Reply via email to