dongjoon-hyun commented on code in PR #47253:
URL: https://github.com/apache/spark/pull/47253#discussion_r1703383620
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/python/PythonUDFSuite.scala:
##########
@@ -86,6 +86,61 @@ class PythonUDFSuite extends QueryTest with
SharedSparkSession {
checkAnswer(actual, expected)
}
+ test("variant input to pandas grouped agg UDF") {
+ assume(shouldTestPandasUDFs)
+ val df = spark.range(0, 10).selectExpr(
+ """parse_json(format_string('{"%s": "test"}', id)) as v""")
+
+ val testUdf = TestGroupedAggPandasUDFStringifiedMax(name = "pandas_udf")
+ checkError(
+ exception = intercept[AnalysisException] {
+ df.agg(testUdf(df("v"))).collect()
+ },
+ errorClass = "DATATYPE_MISMATCH.UNSUPPORTED_UDF_INPUT_TYPE",
+ parameters = Map("sqlExpr" -> "\"pandas_udf(v)\"", "dataType" ->
"VARIANT"))
+ }
+
+ test("complex variant input to pandas grouped agg UDF") {
Review Comment:
To @richardc-db, @allisonwang-db , @HyukjinKwon .
This test case seems to miss `assume(shouldTestPandasUDFs)` mistakenly.
--
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]