HyukjinKwon opened a new pull request, #58604:
URL: https://github.com/apache/spark/pull/58604

   ### What changes were proposed in this pull request?
   
   Add `spark.sql.restrictedMode.enabled` (internal, default `false` = 
unchanged). When enabled,
   `reflect`/`java_method` and `TRANSFORM ... USING` are rejected during 
analysis with a new
   `UNSUPPORTED_FEATURE.SQL_RESTRICTED_MODE` error condition. `ADD JAR` / 
JAR-backed
   `CREATE FUNCTION` and the class-loading/URL JDBC data-source options are 
wired to the same flag
   but not yet gated (follow-up).
   
   ### Why are the changes needed?
   
   Provides an opt-in mode that disables dynamic code and external-script 
execution features in SQL
   for deployments that want a more constrained SQL surface. Off by default, so 
there is no behavior
   change unless enabled.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No by default. When the mode is enabled, the listed features are rejected 
with a clear error.
   
   ### How was this patch tested?
   
   New `RestrictedModeSuite`: `reflect` and `TRANSFORM` are rejected when the 
mode is on and allowed
   when off.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Isaac
   
   This pull request and its description were written by Isaac.
   
   Co-authored-by: Isaac <[email protected]>
   


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