You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "charliec05 (via GitHub)" <gi...@apache.org> on 2026/08/28 22:58:39 UTC

[PR] [SPARK-59090][SQL] Drop unresolved transpiled Python UDF options [spark]

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59090][SQL] Drop unresolved transpiled Python UDF options [spark]

Posted by "charliec05 (via GitHub)" <gi...@apache.org>.
charliec05 closed pull request #58399: [SPARK-59090][SQL] Drop unresolved transpiled Python UDF options
URL: https://github.com/apache/spark/pull/58399


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59090][SQL] Drop unresolved transpiled Python UDF options [spark]

Posted by "charliec05 (via GitHub)" <gi...@apache.org>.
charliec05 commented on PR #58399:
URL: https://github.com/apache/spark/pull/58399#issuecomment-5459467482

   Thanks for clarifying, @holdenk. That makes sense — I picked this up before the condition was reachable and agree it is better folded into the PR that introduces the relevant path rather than kept as a standalone change. I will close this PR. Sorry for the noise, and thanks for taking a look.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59090][SQL] Drop unresolved transpiled Python UDF options [spark]

Posted by "holdenk (via GitHub)" <gi...@apache.org>.
holdenk commented on PR #58399:
URL: https://github.com/apache/spark/pull/58399#issuecomment-5458887043

   I think you picked this up too early from the JIRA list it's not a reachable condition yet.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59090][SQL] Drop unresolved transpiled Python UDF options [spark]

Posted by "holdenk (via GitHub)" <gi...@apache.org>.
holdenk commented on PR #58399:
URL: https://github.com/apache/spark/pull/58399#issuecomment-5459165049

   The more I'm thinking about 59090 it probably make sense to land inside another PR rather than as a standalone issue. Sorry @charliec05 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org