bito-code-review[bot] commented on PR #43480:
URL: https://github.com/apache/superset/pull/43480#issuecomment-5399509034
<!-- Bito Reply -->
The flagged issue is correct. In
`superset/mcp_service/chart/plugins/interactive_pivot.py`, the
`map_interactive_pivot_config` function sets `time_grain_sqla` but fails to
populate the `temporal_columns_lookup` control, which is required by the pivot
table to identify which dimensions in the `groupby` list are temporal and
should have the grain applied.
To resolve this, you should update `map_interactive_pivot_config` to
populate `temporal_columns_lookup` with the names of the temporal columns
present in the `rows` and `columns` lists. This ensures the pivot table
correctly applies the `time_grain_sqla` to the intended dimensions.
Would you like me to implement this fix and check the rest of the PR
comments for other issues?
**superset/mcp_service/chart/plugins/interactive_pivot.py**
```
if config.time_grain:
form_data["time_grain_sqla"] = config.time_grain.value
# Identify temporal dimensions for the pivot table
temporal_cols = [col.name for col in config.rows + config.columns if
col.is_temporal]
form_data["temporal_columns_lookup"] = {col: True for col in
temporal_cols}
```
--
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]