harshmotw-db commented on code in PR #48770:
URL: https://github.com/apache/spark/pull/48770#discussion_r1831624144
##########
python/pyspark/sql/tests/test_udf.py:
##########
@@ -334,68 +334,72 @@ def test_udf_with_filter_function(self):
self.assertEqual(sel.collect(), [Row(key=1, value="1")])
def test_udf_with_variant_input(self):
- df = self.spark.range(0, 10).selectExpr("parse_json(cast(id as
string)) v")
-
- u = udf(lambda u: str(u), StringType())
- with self.assertRaises(AnalysisException) as ae:
- df.select(u(col("v"))).collect()
-
- self.check_error(
- exception=ae.exception,
- errorClass="DATATYPE_MISMATCH.UNSUPPORTED_UDF_INPUT_TYPE",
- messageParameters={"sqlExpr": '"<lambda>(v)"', "dataType":
"VARIANT"},
- )
+ for arrow_enabled in ["false", "true"]:
+ with self.sql_conf({"spark.sql.execution.pythonUDF.arrow.enabled":
arrow_enabled}):
Review Comment:
Yes
--
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]