HyukjinKwon commented on PR #58604:
URL: https://github.com/apache/spark/pull/58604#issuecomment-5594965368

   Thanks @sunchao for the careful post-merge review. I've addressed all three 
findings in a follow-up: #58642.
   
   1. **Enforce across both analyzer paths.** `HybridAnalyzer.apply` now routes 
a restricted-mode session to the fixed-point analyzer (where 
`checkRestrictedMode` runs) in every single-pass mode, including the 
fully-enabled mode that skips `ResolverGuard`. Test: enforcement holds with 
`spark.sql.analyzer.singlePassResolver.enabled`/`enabledTentatively`.
   2. **Reject before class initialization.** 
`CallMethodViaReflection.checkInputDataTypes` short-circuits in restricted 
mode, so a call that is going to be rejected never resolves the class via 
`Utils.classForName` (no static initializer). Test uses a fixture whose 
initializer sets a system property and asserts it stays unset.
   3. **Traverse each subquery once.** The `innerChildren` recursion now skips 
plans that are already the node's subqueries (reached via 
`SubqueryExpression`), keeping validation linear; added coverage for a feature 
nested in a scalar subquery and for deeply nested subqueries with no restricted 
feature.
   
   All changes are scoped to restricted mode, so default behavior is unchanged.


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