cloud-fan commented on code in PR #58549:
URL: https://github.com/apache/spark/pull/58549#discussion_r4139319570


##########
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:
   **Non-blocking (P2):** This combined branch also handles a valid UDAF result 
with CHAR/VARCHAR only in `bufferType`, but it always reports `Python UDF 
return types` and `dataType`. Older Connect clients and direct JVM construction 
can reach this backstop, so that buffer-only failure blames the valid result 
type and gives no indication that the buffer schema must change. Please split 
or parameterize the buffer check so it reports the buffer feature and 
`bufferType`.
   
   See **Shared repair plan 1** in the review body.



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