bito-code-review[bot] commented on code in PR #38403:
URL: https://github.com/apache/superset/pull/38403#discussion_r2911813179
##########
superset/mcp_service/chart/chart_utils.py:
##########
@@ -916,12 +974,23 @@ def _mixed_timeseries_what(config:
MixedTimeseriesChartConfig) -> str:
return f"{primary} + {secondary}"
+def _big_number_chart_what(config: BigNumberChartConfig) -> str:
+ """Build the 'what' portion for a big number chart name."""
+ metric_label = (
+ config.metric.label or
f"{config.metric.aggregate}({config.metric.name})"
+ )
Review Comment:
<!-- Bito Reply -->
Yes, the suggestion is valid — it prioritizes the label if available,
otherwise constructs the metric label using the aggregate (defaulting to SUM)
and name, preventing None from appearing in the string.
**superset/mcp_service/chart/chart_utils.py**
```
metric_label = (
config.metric.label or f"{(config.metric.aggregate or
'SUM').upper()}({config.metric.name})"
)
```
--
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]