HyukjinKwon commented on code in PR #36113:
URL: https://github.com/apache/spark/pull/36113#discussion_r846924768
##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala:
##########
@@ -111,14 +111,17 @@ class QueryCompilationErrorsSuite extends QueryTest with
SharedSparkSession {
(536363, "86123A", 6, 17851)
).toDF("InvoiceNo", "StockCode", "Quantity", "CustomerID")
val e = intercept[AnalysisException] {
- val pandasTestUDF = TestGroupedAggPandasUDF(name = "pandas_udf")
+ val pandasTestUDF1 = TestGroupedAggPandasUDF(name = "pandas_udf_1")
+ val pandasTestUDF2 = TestGroupedAggPandasUDF(name = "pandas_udf_2")
df.groupBy("CustomerId")
- .agg(pandasTestUDF(df("Quantity")), sum(df("Quantity"))).collect()
+ .agg(pandasTestUDF1(df("Quantity")), pandasTestUDF2(df("Quantity")),
sum(df("Quantity")))
+ .collect()
}
- assert(e.errorClass === Some("CANNOT_USE_MIXTURE"))
+ assert(e.errorClass === Some("INVALID_PANDAS_UDF_PLACEMENT"))
assert(e.message ===
- "Cannot use a mixture of aggregate function and group aggregate pandas
UDF")
+ "The group aggregate pandas UDF 'pandas_udf_1, pandas_udf_2' cannot be
invoked " +
Review Comment:
If we're going to quote the function name, I think the output should look
like `'pandas_udf_1', 'pandas_udf_2'`
--
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]