rusackas opened a new pull request, #34511:
URL: https://github.com/apache/superset/pull/34511

   ### SUMMARY
   This PR fixes the duration display in SQL Lab's Query History tab to show 
only the actual query execution time rather than the total time including 
queue/scheduling delays.
   
   The issue was that the duration calculation used `end_time - start_time`, 
which includes the time a query spends in various states (pending, scheduled, 
etc.) before actually executing. This fix updates the calculation to use 
`start_running_time` when available, which represents when the query actually 
began executing.
   
   **Changes:**
   - Added `start_running_time` to the API response in 
`QueryRestApi.list_columns`
   - Updated TypeScript interfaces to include the new field
   - Modified the duration calculation in QueryHistoryList to prefer 
`start_running_time` over `start_time`
   
   Fixes #30894
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   **Before:** Duration shows total time including queue/wait time
   **After:** Duration shows only actual execution time
   
   ### TESTING INSTRUCTIONS
   1. Go to SQL Lab
   2. Run several queries of varying complexity
   3. Navigate to the "Query History" tab
   4. Verify that the Duration column shows reasonable execution times (e.g., 
simple SELECT queries should show durations under a second)
   5. For queries that were queued or scheduled, verify the duration reflects 
only the actual execution time
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: #30894
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.ai/code)


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