codeant-ai-for-open-source[bot] commented on PR #38388:
URL: https://github.com/apache/superset/pull/38388#issuecomment-4055118969
## **Sequence Diagram**
This PR changes SQL response conversion so every data-bearing statement in a
multi-statement query keeps its own rows and columns in the statements array.
The top-level rows and columns remain sourced from the last data-bearing
statement for backward compatibility, with a warning added when multiple
data-bearing results exist.
```mermaid
sequenceDiagram
participant Client
participant ExecuteSqlTool
participant QueryEngine
Client->>ExecuteSqlTool: Submit multi statement SQL
ExecuteSqlTool->>QueryEngine: Execute SQL statements
QueryEngine-->>ExecuteSqlTool: Return per statement execution results
ExecuteSqlTool->>ExecuteSqlTool: Attach per statement data rows and
columns
ExecuteSqlTool->>ExecuteSqlTool: Set top level rows columns from last
data bearing statement
alt Multiple data bearing statements
ExecuteSqlTool->>ExecuteSqlTool: Add multi statement warning
end
ExecuteSqlTool-->>Client: Return response with statements data and top
level fields
```
---
*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]