ametel01 opened a new pull request, #23284:
URL: https://github.com/apache/datafusion/pull/23284

   ## Which issue does this PR close?
   
   - Closes #23246.
   
   ## Rationale for this change
   
   `datafusion-sql` used `StackGuard` to temporarily raise `recursive`'s 
process-global minimum stack size while planning or unparsing deep SQL 
structures. Because that global is shared across threads, one guard could 
restore a lower value while another thread was still relying on DataFusion's 
larger SQL red zone.
   
   ## What changes are included in this PR?
   
   This PR replaces the scoped global mutation with local `stacker::maybe_grow` 
checkpoints for the SQL planner/unparser recursion paths that need a 256 KiB 
red zone. The public planning and unparsing APIs are unchanged.
   
   It also adds regressions covering both non-mutating stack growth and deep 
unparsing while another thread repeatedly lowers `recursive`'s global minimum 
to the default value.
   
   ## Are these changes tested?
   
   Yes.
   
   - `cargo test -p datafusion-sql --features recursive_protection`
   - `cargo fmt --all --check`
   - `cargo clippy -p datafusion-sql --all-targets --all-features -- -D 
warnings`
   - `cargo clippy --all-targets --all-features -- -D warnings`
   
   ## Are there any user-facing changes?
   
   No.


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