Uh oh!
There was an error while loading. Please reload this page.
[SPARK-44876][PYTHON] Fix Arrow-optimized Python UDF on Spark Connect - #42568
[SPARK-44876][PYTHON] Fix Arrow-optimized Python UDF on Spark Connect#42568ueshin wants to merge 2 commits into
Conversation
ueshin
commented
Aug 18, 2023
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
xinrong-meng
commented
Aug 18, 2023
LGTM, pending test |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Sorry, but the PR title looks misleading to me. This PR technically implements UDF feature instead of simply enabling UDF test code. Can we have a more intuitive PR title?
dongjoon-hyun
commented
Aug 19, 2023
To the reviewers,
I'm not disagree with backporting this PR, but I believe we need to give a correct PR title instead of saying a missing test coverage. |
@dongjoon-hyun Thanks for reviewing this! Sure, I'll update the title and description, but as for the backport, actually this is already implemented in 3.5 at #39384 and #40725. Unfortunately it had a bug and we didn't notice it because the test had not been activated for CI. |
HyukjinKwon
commented
Aug 21, 2023
Merged to master and branch-3.5 |
### What changes were proposed in this pull request? Fixes Arrow-optimized Python UDF on Spark Connect. Also enables the missing test `pyspark.sql.tests.connect.test_parity_arrow_python_udf`. ### Why are the changes needed? `pyspark.sql.tests.connect.test_parity_arrow_python_udf` is not listed in `dev/sparktestsupport/modules.py`, and it fails when running manually. ``` ====================================================================== ERROR [0.072s]: test_register (pyspark.sql.tests.connect.test_parity_arrow_python_udf.ArrowPythonUDFParityTests) ---------------------------------------------------------------------- Traceback (most recent call last): ... pyspark.errors.exceptions.base.PySparkRuntimeError: [SCHEMA_MISMATCH_FOR_PANDAS_UDF] Result vector from pandas_udf was not the required length: expected 1, got 38. ``` The failure had not been captured because the test is missing in the `module.py` file. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. Closes#42568 from ueshin/issues/SPARK-44876/test_parity_arrow_python_udf. Authored-by: Takuya UESHIN <ueshin@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org> (cherry picked from commit 75c0b8b) Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
### What changes were proposed in this pull request? Fixes Arrow-optimized Python UDF on Spark Connect. Also enables the missing test `pyspark.sql.tests.connect.test_parity_arrow_python_udf`. ### Why are the changes needed? `pyspark.sql.tests.connect.test_parity_arrow_python_udf` is not listed in `dev/sparktestsupport/modules.py`, and it fails when running manually. ``` ====================================================================== ERROR [0.072s]: test_register (pyspark.sql.tests.connect.test_parity_arrow_python_udf.ArrowPythonUDFParityTests) ---------------------------------------------------------------------- Traceback (most recent call last): ... pyspark.errors.exceptions.base.PySparkRuntimeError: [SCHEMA_MISMATCH_FOR_PANDAS_UDF] Result vector from pandas_udf was not the required length: expected 1, got 38. ``` The failure had not been captured because the test is missing in the `module.py` file. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. Closesapache#42568 from ueshin/issues/SPARK-44876/test_parity_arrow_python_udf. Authored-by: Takuya UESHIN <ueshin@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
What changes were proposed in this pull request?
Fixes Arrow-optimized Python UDF on Spark Connect.
Also enables the missing test
pyspark.sql.tests.connect.test_parity_arrow_python_udf.Why are the changes needed?
pyspark.sql.tests.connect.test_parity_arrow_python_udfis not listed indev/sparktestsupport/modules.py, and it fails when running manually.The failure had not been captured because the test is missing in the
module.pyfile.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests.