You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/29 18:13:14 UTC

[GitHub] [spark] bjornjorgensen opened a new pull request, #39293: [SPARK-41774][PS] Remove def test_vectorized_udf_unsupported_types

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

   ### What changes were proposed in this pull request?
   
   https://github.com/apache/spark/blob/18488158beee5435f99899f99b2e90fb6e37f3d5/python/pyspark/sql/tests/pandas/test_pandas_udf_scalar.py#L603
   
   
   ```
   def test_vectorized_udf_wrong_return_type(self):
           with QuietTest(self.sc):
               for udf_type in [PandasUDFType.SCALAR, PandasUDFType.SCALAR_ITER]:
                   with self.assertRaisesRegex(
                       NotImplementedError,
                       "Invalid return type.*scalar Pandas UDF.*ArrayType.*TimestampType",
                   ):
                       pandas_udf(lambda x: x, ArrayType(TimestampType()), udf_type)
   ```
   
   is the same code as 
   
   https://github.com/apache/spark/blob/18488158beee5435f99899f99b2e90fb6e37f3d5/python/pyspark/sql/tests/pandas/test_pandas_udf_scalar.py#L679
   
   
   ```
   def test_vectorized_udf_unsupported_types(self):
           with QuietTest(self.sc):
               for udf_type in [PandasUDFType.SCALAR, PandasUDFType.SCALAR_ITER]:
                   with self.assertRaisesRegex(
                       NotImplementedError,
                       "Invalid return type.*scalar Pandas UDF.*ArrayType.*TimestampType",
                   ):
                       pandas_udf(lambda x: x, ArrayType(TimestampType()), udf_type)
   ```
   
   
   [Sonarcloud](https://sonarcloud.io/project/issues?languages=py&resolved=false&rules=python%3AS4144&id=spark-python&open=AYQdnW-FRrJbVxW9ZDO0)
   
   ### Why are the changes needed?
   We don't need to have this double or we can fix one of them. 
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Pass GA
   


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


[GitHub] [spark] dongjoon-hyun closed pull request #39293: [SPARK-41774][PYTHON][TESTS] Remove duplicated `test_vectorized_udf_unsupported_types` test

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #39293: [SPARK-41774][PYTHON][TESTS] Remove duplicated `test_vectorized_udf_unsupported_types` test
URL: https://github.com/apache/spark/pull/39293


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