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

   ## **Sequence Diagram**
   
   This PR adds a computed popularity_score to chart, dashboard, and dataset 
list tools. The score is calculated only when requested, and popularity-based 
sorting uses a two-pass flow to rank first, then paginate and return full 
records.
   
   ```mermaid
   sequenceDiagram
       participant Client
       participant MCP List Tool
       participant DAO
       participant Popularity Module
   
       Client->>MCP List Tool: List assets with select columns or order column 
popularity_score
   
       alt Order by popularity_score
           MCP List Tool->>DAO: Fetch all matching asset ids
           MCP List Tool->>Popularity Module: Compute scores and sort ids
           MCP List Tool->>DAO: Fetch paged assets by sorted ids
       else popularity_score only requested in select columns
           MCP List Tool->>DAO: Fetch paged assets with normal ordering
           MCP List Tool->>Popularity Module: Compute scores for returned ids
       end
   
       MCP List Tool-->>Client: Return assets with popularity_score when 
requested
   ```
   
   ---
   *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