aminghadersohi commented on PR #40339:
URL: https://github.com/apache/superset/pull/40339#issuecomment-4567219241

   Both points in review `4382468337` are valid — fixed in 
`fded66cb5d4b4b1bd025a23dd8270d81a52bc450`.
   
   **1. `orderby` missing when metrics are present**
   
   `BaseDeckGLViz.query_obj()` explicitly sets:
   ```python
   query_obj["orderby"] = [(first_metric, not self.form_data.get("order_desc", 
True))]
   ```
   
   The fallback now does the same: when `deck_metrics` is non-empty it sets 
`qd["orderby"] = [(deck_metrics[0], not form_data.get("order_desc", True))]`. 
Charts with no metrics (pure spatial column queries) don't get an `orderby`, 
matching the `else` branch in `BaseDeckGLViz.query_obj()`.
   
   **2. Time-grain fields dropped for animated charts**
   
   `deck_arc`, `deck_path`, `deck_polygon`, `deck_scatter`, and 
`deck_screengrid` each set `is_timeseries = 
bool(form_data.get("time_grain_sqla"))` in their `__init__`. When true, 
`BaseViz.query_obj()` includes `granularity`, `is_timeseries`, and 
`extras["time_grain_sqla"]`.
   
   Added `_DECK_TIMESERIES_VIZ_TYPES` frozenset and — when `time_grain_sqla` is 
present for those viz types — the fallback now sets all three fields. 
`deck_geojson`, `deck_grid`, `deck_hex`, etc. are intentionally excluded since 
their `BaseDeckGLViz.is_timeseries` remains `False`.
   
   Four new tests cover both behaviors.


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