codeant-ai-for-open-source[bot] commented on PR #37669:
URL: https://github.com/apache/superset/pull/37669#issuecomment-3853520731

   ## **Sequence Diagram**
   
   The PR fixes handling of metric-based point sizes by preserving full adhoc 
metric objects (including expressionType/sqlExpression) when building the 
query, deduplicating by metric label, and using only the label string for 
orderby. This prevents the backend "Metric does not exist" errors for custom 
SQL metrics.
   
   ```mermaid
   sequenceDiagram
       participant UI
       participant buildQuery
       participant QueryContext
   
       UI->>buildQuery: Submit formData with point_radius_fixed (type: metric, 
value: adhoc SQL object)
       buildQuery->>buildQuery: Detect metric type; preserve full 
QueryFormMetric object (don't extract label)
       buildQuery->>buildQuery: Deduplicate metrics by getMetricLabel and add 
metric object to metrics array
       buildQuery->>QueryContext: Return query with metrics containing adhoc 
metric OBJECT and orderby using getMetricLabel(metric) string
       QueryContext-->>UI: Query ready for backend (adhoc metric preserved, 
orderby uses label)
   ```
   
   ---
   *Generated by [CodeAnt AI](https://codeant.ai)*
   


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