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

   ### What changes were proposed in this pull request?
   
   This pull request makes `ResolveTranspiledPythonUDFOptions` keep a 
category-matching transpiled option only when the option expression is also 
resolved.
   
   If no resolved option remains, the rule clears the options and lets 
`ConvertToCatalyst` use the original interpreted Python UDF. A Catalyst unit 
test covers a matching option that contains an unresolved attribute.
   
   ### Why are the changes needed?
   
   The rule currently filters options only by their declared input categories. 
A matching option can still contain an expression that does not resolve. 
Because transpiled options are children of `TranspiledPythonUDF`, 
`CheckAnalysis` then rejects the entire query before the normal 
interpreted-Python fallback can run.
   
   Dropping that option preserves the existing fail-closed behavior used for 
category mismatches.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. With the experimental Python UDF transpiler enabled, a transpiled 
option that cannot resolve now falls back to the interpreted Python UDF instead 
of failing the query during analysis.
   
   ### How was this patch tested?
   
   Added a regression case to `ResolveTranspiledPythonUDFOptionsSuite` and ran:
   
   ```
   build/sbt "catalyst/Test/testOnly 
org.apache.spark.sql.catalyst.analysis.ResolveTranspiledPythonUDFOptionsSuite"
   dev/lint-scala
   git diff --check
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-5)
   


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