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

   ### What changes were proposed in this pull request?
   
   This PR reverts the opt-in in-process Python UDF execution added by 
SPARK-59718 (#58978), together with the two follow-ups that only touch it:
   
   - SPARK-61767 (#60545): extract the batch export of the in-process evaluator 
into `InProcessArrowBatchExporter`
   - SPARK-61280 (#60257): start the in-process UDF probe JVMs with Spark's 
module options
   - SPARK-59718 (#58978): add opt-in in-process Python UDF execution via Arrow 
C Data Interface
   
   This removes `pyspark.inprocess`, `InProcessPythonPlugin`, the in-process 
evaluator and exec node, the `SQL_SCALAR_ARROW_INPROCESS_UDF` eval type, the 
`spark.python.inProcess.sitePackages` and 
`spark.sql.execution.pythonUDF.inProcess.fullValidation.enabled` 
configurations, the related error conditions, the JEP dependency, the user 
guide and benchmark, and the JEP/CDI setup in the Python 3.12 CI image.
   
   Conflicts with changes merged after SPARK-59718 are resolved by keeping 
those changes and removing only the in-process parts. In particular:
   
   - `org.apache.arrow:arrow-c-data` stays a compile dependency, since native 
data sources (SPARK-60101) need it at run time.
   - Later changes to `EvalPythonEvaluatorFactory`, `PythonUDF`, 
`SparkStrategies`, `pyspark.util` and `dev/sparktestsupport/modules.py` stay as 
they are, apart from their in-process code.
   
   ### Why are the changes needed?
   
   After internal discussion, we concluded that this feature is too restrictive 
to be broadly useful: it needs an executor plugin, JEP and its native library 
on every executor, ideally one task per executor, and Spark Classic only, and 
it gives up the process isolation of Python workers. It is also easy for users 
to confuse with the existing Arrow Python UDFs, since both accept and return 
Arrow arrays, but they differ in deployment, isolation and supported features. 
So we would rather not ship it.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No for released versions. SPARK-59718 has not been released; this PR removes 
the `pyspark.inprocess.inprocess_udf` API and its configurations from the 
unreleased master, branch-4.x and branch-4.4.
   
   ### How was this patch tested?
   
   Existing tests. Compiled the affected modules and ran scalastyle, plus 
`CollapseProjectSuite`, `ConvertToCatalystSuite`, `ExtractPythonUDFsSuite`, 
`PythonUDFSuite`, `CachedTableSuite`, `*EvalPythonExecSuite` and 
`InvalidInputErrorsSuite`.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5)
   
   This pull request and its description were written by Isaac.
   


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