Rajesh Vakkalagadda created SPARK-59387:
-------------------------------------------
Summary: Add test for restricted-mode rejection of banned
functions nested in subqueries
Key: SPARK-59387
URL: https://issues.apache.org/jira/browse/SPARK-59387
Project: Spark
Issue Type: Test
Components: SQL
Affects Versions: 4.4.0
Reporter: Rajesh Vakkalagadda
The restricted-mode gate (SPARK-59319) rejects reflect / java_method /
try_reflect and TRANSFORM ... USING, and its core promise is that banned
features "cannot slipĀ
through", covering SubqueryExpression plans, analyzed reused sub-plans, and
command bodies. RestrictedModeSuite covers top-level calls, top-level
TRANSFORM, and analyzed-subplan reuse, butĀ nothing exercises the
SubqueryExpression branch, which is the one traversal path whose regression
would fail silently with banned code running and no test going red, instead of
failing loudly. This adds "restricted mode rejects banned functions nested in
subqueries", which verifies reflect, java_method, and try_reflect inside EXISTS
and reflect inside a scalar subquery, asserting
UNSUPPORTED_FEATURE.SQL_RESTRICTED_MODE, plus a mode-off control. The test is
analysis-only and needs no session.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]