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

   ## Which issue does this PR close?
   
   - Closes #25823.
   
   ## Rationale for this change
   
   Applications embedding DataFusion may want to allow DML operations such as 
INSERT into registered table providers while disallowing COPY, which writes 
query results to a file or object store. SQLOptions currently controls COPY 
through allow_dml, so COPY cannot be disabled without also disabling other DML.
   
   ## What changes are included in this PR?
   
   - Add SQLOptions::with_allow_copy to control COPY independently, defaulting 
to true.
   - Keep with_allow_dml(false) behavior unchanged so it continues to reject 
COPY.
   - Add an integration test showing that disabling COPY does not disable 
INSERT.
   
   ## What is the testing strategy for this PR?
   
   - cargo fmt --all -- --check
   - cargo clippy --all-targets --all-features -- -D warnings
   - cargo test -p datafusion --test core_integration -- 
sql::sql_api::copy_can_be_disabled_independently_from_dml --exact
   - cargo test -p datafusion --test core_integration -- 
sql::sql_api::unsupported_copy_returns_error --exact
   
   ## Are there any user-facing changes?
   
   Yes. This adds the public SQLOptions::with_allow_copy builder method. It is 
backwards compatible because COPY remains enabled by default and 
with_allow_dml(false) continues to reject COPY.
   


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