codeant-ai-for-open-source[bot] commented on PR #38388:
URL: https://github.com/apache/superset/pull/38388#issuecomment-4030140674
## **Sequence Diagram**
This PR changes the execute_sql MCP tool so that each data-bearing SQL
statement in a multi-statement query retains its own result data, while the
top-level response still reflects only the last data-bearing statement and may
include a warning to inspect all statements.
```mermaid
sequenceDiagram
participant Client
participant MCPTool
participant QueryEngine
participant Database
Client->>MCPTool: Call execute_sql with multi-statement SQL
MCPTool->>QueryEngine: Execute SQL statements
QueryEngine->>Database: Run each statement
Database-->>QueryEngine: Per-statement results
QueryEngine-->>MCPTool: QueryResult with per-statement data
MCPTool->>MCPTool: Build per-statement data, pick last data-bearing for
top-level, set optional warning
MCPTool-->>Client: ExecuteSqlResponse with rows, statements data, and
multi-statement warning
```
---
*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]