dajiaohuang opened a new pull request, #7348:
URL: https://github.com/apache/datafusion-comet/pull/7348

   ## Which issue does this PR close?
   
   Closes #7312.
   
   ## Rationale for this change
   
   A captured Comet setting may be unset on the session after a plan is cached. 
Inside a later SQL execution Spark propagates the current SQL configuration to 
the task, but if none of the captured keys remains set, 
`CapturedSQLConf.withConf` mistakes the absence of those keys for an 
unpropagated configuration and reinstalls the stale capture.
   
   ## What changes are included in this PR?
   
   As proposed in #7312, skip the captured configuration when the task has a 
SQL execution id. The existing captured-key check remains for callers that 
propagate SQL configuration without an execution id, and non-SQL tasks continue 
to use the capture when needed.
   
   A regression test builds a capture with only one key, unsets that key, and 
checks a second session setting inside an actual SQL execution task. It also 
checks the non-SQL fallback and an existing task property without a SQL 
execution id.
   
   ## How are these changes tested?
   
   - Before the fix the regression returned `(stale, missing)` instead of 
`(missing, current)`.
   - The regression and its controls passed under Spark 4.1 and Spark 3.5, with 
one test executed on each profile.
   - `make format`, `make` and `git diff --check` passed in an isolated Linux 
environment using JDK 17.
   
   The remaining Spark profiles and upstream Spark SQL suites were not run 
locally.
   


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