cloud-fan commented on a change in pull request #25130: 
[SPARK-28359][SQL][PYTHON][TESTS] Make integrated UDF tests robust by making 
UDFs (virtually) no-op
URL: https://github.com/apache/spark/pull/25130#discussion_r303283620
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/IntegratedUDFTestUtils.scala
 ##########
 @@ -35,8 +36,12 @@ import org.apache.spark.sql.types.StringType
  * This object targets to integrate various UDF test cases so that Scalar UDF, 
Python UDF and
  * Scalar Pandas UDFs can be tested in SBT & Maven tests.
  *
- * The available UDFs cast input to strings, which take one column as input 
and return a string
- * type column as output.
+ * The available UDFs are special. It defines an UDF wrapped by cast. So, 
Input column is casted
+ * into string, UDF returns strings as are, and then output column is casted 
back to the input
+ * column. In this way, UDF is virtually no-op.
+ *
+ * Note that, due to this implementation limitation, complex types such as 
map, array and struct
+ * types do not work this this UDF because they cannot be same after the cast 
roundtrip.
 
 Review comment:
   double `this`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to