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

   ## Nitpicks 🔍
   
   <table>
   <tr><td>🔒&nbsp;<strong>No security issues identified</strong></td></tr>
   <tr><td>⚡&nbsp;<strong>Recommended areas for review</strong><br><br>
   
   - [ ] <a 
href='https://github.com/apache/superset/pull/36872/files#diff-d2f5299660a67fb698ed13825f1bf74b253d559d48a40206320008675003776eR224-R229'><strong>Unchecked
 cursor.stats access</strong></a><br>The code reads `cursor.stats` and indexes 
keys like `"state"`, `"completedSplits"`, and `"totalSplits"` without guards. 
If `stats` is None or missing keys (or returns zero/None for `totalSplits`) 
this can raise KeyError or produce incorrect progress values (division 
semantics). Consider defensive access/validation and limit progress to [0.0, 
1.0].<br>
   
   - [ ] <a 
href='https://github.com/apache/superset/pull/36872/files#diff-d2f5299660a67fb698ed13825f1bf74b253d559d48a40206320008675003776eR300-R303'><strong>Monkeypatching
 private cursor attributes</strong></a><br>`execute_with_cursor` assigns 
`_execute_result` and `_execute_event` attributes on the `cursor` instance 
(private attribute names). Mutating private third-party objects is fragile and 
risks name collisions or future breakage. Prefer passing those values 
explicitly to `handle_cursor` or using a well-namespaced attribute name.<br>
   
   - [ ] <a 
href='https://github.com/apache/superset/pull/36872/files#diff-d2f5299660a67fb698ed13825f1bf74b253d559d48a40206320008675003776eR213-R216'><strong>QueryStatus
 comparison</strong></a><br>The code checks `query.status in 
[QueryStatus.STOPPED, QueryStatus.TIMED_OUT]`. Confirm the runtime 
type/representation of `query.status` — if it's stored as a string (e.g. 
"STOPPED") this enum comparison will never match. Validate and coerce types or 
compare against string values consistently.<br>
   
   </td></tr>
   </table>
   


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