You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2025/06/08 23:05:44 UTC
[PR] [SPARK-52420][PYTHON][TESTS] Make test_udtf_with_invalid_return_type compatible with Python only client [spark]
HyukjinKwon opened a new pull request, #51121:
URL: https://github.com/apache/spark/pull/51121
### What changes were proposed in this pull request?
This PR is a followup of https://github.com/apache/spark/pull/50997 that backports the test changes into branch-3.5.
### Why are the changes needed?
To make the build pass (https://github.com/apache/spark/actions/runs/15522509263/job/43697654408).
```
======================================================================
FAIL [0.015s]: test_udtf_with_invalid_return_type (pyspark.sql.tests.connect.test_parity_udtf.UDTFParityTests.test_udtf_with_invalid_return_type)
----------------------------------------------------------------------
pyspark.errors.exceptions.connect.SparkConnectGrpcException: (org.apache.spark.sql.connect.common.InvalidPlanInput) [INVALID_SCHEMA_TYPE_NON_STRUCT] Invalid schema type. Expect a struct type, but got "INT". SQLSTATE: 42K09
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/work/spark/spark-3.5/python/pyspark/sql/tests/connect/test_parity_udtf.py", line 57, in test_udtf_with_invalid_return_type
with self.assertRaisesRegex(
AssertionError: "Invalid Python user-defined table function return type." does not match "(org.apache.spark.sql.connect.common.InvalidPlanInput) [INVALID_SCHEMA_TYPE_NON_STRUCT] Invalid schema type. Expect a struct type, but got "INT". SQLSTATE: 42K09"
----------------------------------------------------------------------
```
Now that the error message has changed, the tests in branch-3.5 fails.
### Does this PR introduce _any_ user-facing change?
No, test-only.
### How was this patch tested?
Manually.
### Was this patch authored or co-authored using generative AI tooling?
No.
--
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-52420][PYTHON][TESTS] Make test_udtf_with_invalid_return_type compatible with Python only client [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #51121:
URL: https://github.com/apache/spark/pull/51121#discussion_r2146820273
##########
python/pyspark/sql/tests/connect/test_parity_udtf.py:
##########
@@ -60,9 +60,7 @@ class TestUDTF:
def eval(self, a: int):
yield a + 1,
- with self.assertRaisesRegex(
- InvalidPlanInput, "Invalid schema type. Expect a struct type, but got"
- ):
+ with self.assertRaisesRegex(InvalidPlanInput, "Invalid.*type"):
Review Comment:
Oh shoot
--
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-52420][PYTHON][TESTS] Make test_udtf_with_invalid_return_type compatible with Python only client [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #51121:
URL: https://github.com/apache/spark/pull/51121#issuecomment-2955330757
Merged to master, branch-4.0 and branch-3.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-52420][PYTHON][TESTS] Make test_udtf_with_invalid_return_type compatible with Python only client [spark]
Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #51121:
URL: https://github.com/apache/spark/pull/51121#discussion_r2141991516
##########
python/pyspark/sql/tests/connect/test_parity_udtf.py:
##########
@@ -60,9 +60,7 @@ class TestUDTF:
def eval(self, a: int):
yield a + 1,
- with self.assertRaisesRegex(
- InvalidPlanInput, "Invalid schema type. Expect a struct type, but got"
- ):
+ with self.assertRaisesRegex(InvalidPlanInput, "Invalid.*type"):
Review Comment:
@HyukjinKwon The class or exception `InvalidPlanInput` is not defined in PySpark for the `branch-3.5` version:
- https://github.com/apache/spark/actions/runs/15532113241/job/43723223552

--
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-52420][PYTHON][TESTS] Make test_udtf_with_invalid_return_type compatible with Python only client [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #51121: [SPARK-52420][PYTHON][TESTS] Make test_udtf_with_invalid_return_type compatible with Python only client
URL: https://github.com/apache/spark/pull/51121
--
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-52420][PYTHON][TESTS] Make test_udtf_with_invalid_return_type compatible with Python only client [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #51121:
URL: https://github.com/apache/spark/pull/51121#discussion_r2146820647
##########
python/pyspark/sql/tests/connect/test_parity_udtf.py:
##########
@@ -60,9 +60,7 @@ class TestUDTF:
def eval(self, a: int):
yield a + 1,
- with self.assertRaisesRegex(
- InvalidPlanInput, "Invalid schema type. Expect a struct type, but got"
- ):
+ with self.assertRaisesRegex(InvalidPlanInput, "Invalid.*type"):
Review Comment:
pushed a followup
--
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