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

   <!-- Bito Reply -->
   The observation is correct. Moving `stream_results=True` from the connection 
level to the statement level is the necessary fix to prevent the connection 
from being permanently mutated into server-side cursor mode. Using a 
`before_cursor_execute` event listener to inspect `cursor.name` or the 
statement itself is a robust way to verify that the streaming option is 
correctly applied to the specific statement rather than the connection.
   
   **superset/versioning/activity/queries.py**
   ```
   result = (
                   db.session.connection()
   -                .execution_options(stream_results=True)
   -                .execute(stmt)
   +                .execute(stmt.execution_options(stream_results=True))
                   .mappings()
               )
   ```


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