srielau commented on code in PR #58549:
URL: https://github.com/apache/spark/pull/58549#discussion_r4145292401


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/UserDefinedPythonFunction.scala:
##########
@@ -63,6 +64,11 @@ case class UserDefinedPythonFunction(
     bufferType: DataType = null) {
 
   def builder(e: Seq[Expression]): Expression = {
+    if (CharVarcharUtils.hasCharVarchar(dataType) ||
+        (bufferType != null && CharVarcharUtils.hasCharVarchar(bufferType))) {

Review Comment:
   Fixed in c332e878b89. Return and buffer checks are separate: a buffer-only 
CHAR/VARCHAR failure now reports feature `Python UDAF buffer schemas` and 
`bufferType.catalogString`. The shared error text tells callers to declare 
STRING, which is valid for both return types and UDAF bufferSchema. Invalid 
return types are still reported first when both are constrained.



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

Reply via email to