bito-code-review[bot] commented on PR #35898:
URL: https://github.com/apache/superset/pull/35898#issuecomment-3465789316

   <details open>
     <summary><strong>Interaction Diagram by <a 
href="https://bito.ai#sequence_diagram";>Bito</a></strong></summary>
   
   ```mermaid
   sequenceDiagram
   participant ViewQueryModal as ViewQueryModal
   participant ViewQuery as ViewQuery<br/>🔄 Updated | ●●● High
   participant Redux as Redux State
   participant DatasetAPI as Dataset API
   participant FormatAPI as Format SQL API
   participant Test as Test Suite<br/>🟩 Added | ●●○ Medium
   ViewQueryModal->>ViewQuery: Render with sql & datasource
   ViewQuery->>Redux: Check exploreBackend selector
   alt No backend in Redux
   ViewQuery->>DatasetAPI: GET /api/v1/dataset/&#123;id&#125;
   DatasetAPI-->>ViewQuery: Return database object
   ViewQuery->>ViewQuery: Destructure backend property
       end
   ViewQuery->>FormatAPI: POST format_sql with engine (string)
   FormatAPI-->>ViewQuery: Return formatted SQL
   Test->>ViewQuery: Verify engine is string not object
   ```
   Critical path: ViewQueryModal-&gt;ViewQuery 
(MODIFIED)-&gt;DatasetAPI-&gt;FormatAPI; Test Suite (ADDED) validates fix
   
   
   > **Note:** ViewQuery.tsx now destructures the backend property from the 
dataset API response, ensuring the engine parameter sent to the format_sql 
endpoint is a string rather than an object. A new test validates this behavior 
when backend is fetched from the dataset API instead of Redux state.
   
   </details>


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