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

   ## Which issue does this PR close?
   
   - Closes #24719.
   
   ## Rationale for this change
   
   The statistics runner previously captured SQL parser settings only once. A 
successful `SET` in one query file therefore changed the session but did not 
affect parsing of later files, which made ordered query suites behave 
inconsistently with session state.
   
   ## What changes are included in this PR?
   
   - Read the current session's parser options immediately before parsing each 
query file.
   - Extract file processing into a focused helper without changing the 
existing same-file pre-parsing behavior.
   - Document that parser-setting changes still do not affect later statements 
in the same already-parsed file.
   - Add ordered-file regressions for MySQL dialect propagation and parser 
recursion-limit propagation.
   
   ## Are these changes tested?
   
   - `cargo test -p datafusion-benchmarks --lib statistics::tests -- 
--nocapture` (7 passed)
   - `cargo test -p datafusion-benchmarks --lib 'statistics::tests::refreshes_' 
-- --nocapture` after rebasing (2 passed)
   - `cargo check -p datafusion-benchmarks --lib`
   - `cargo clippy -p datafusion-benchmarks --lib -- -D warnings`
   - `cargo fmt --all -- --check`
   - Ablation: both new regressions fail when parsing uses stale default 
settings.
   
   The broader `cargo clippy -p datafusion-benchmarks --all-targets 
--all-features -- -D warnings` could not complete locally because the optional 
`snmalloc` target requires `cmake`, which is unavailable in this environment. 
It produced no Rust diagnostics before that build-tool failure.
   
   ## Are there any user-facing changes?
   
   Yes. Parser settings changed by an earlier statistics query file now apply 
when later query files are parsed. There are no public API changes.
   
   This draft was prepared with AI assistance and has not yet received human 
review. I understand the implementation end-to-end; there are no known design 
assumptions beyond the documented same-file parsing limitation.
   


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