trakshan-mishra commented on issue #42926:
URL: https://github.com/apache/superset/issues/42926#issuecomment-5708931274

   @AryaKetanShCt are you still planning to send symptom 2? I don't want to 
duplicate your work — if you're on it, it's yours.
   
   If not, @rusackas, I'd like to pick it up.
   
   That matches what I see in the code: `should_infer_filter_granularity` in 
`_apply_granularity` is gated on `is_adhoc_column(x_axis)`, so a chart whose 
time column is still `granularity_sqla` in `params` never reaches the inference 
and lands on the `not granularity and is_timeseries` raise in 
`models/helpers.py` instead.
   
   I'd implement the fallback you described — `form_data`'s `granularity_sqla` 
first, the dataset's main datetime column second — applied only when the query 
object has `is_timeseries` and no `granularity`, so queries that already carry 
one are untouched.
   
   For coverage I'd add a test that builds a query context in the old shape 
(`is_timeseries: true`, no `granularity`, temporal column present only in 
`params`) and asserts it resolves instead of raising, so the regression is 
pinned rather than just fixed.
   
   Happy to open a PR linking this issue if that works for you.
   


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