srowen commented on a change in pull request #27488: 
[SPARK-26580][SQL][ML][FOLLOW-UP] Throw exception when use untyped UDF by 
default
URL: https://github.com/apache/spark/pull/27488#discussion_r380223797
 
 

 ##########
 File path: mllib/src/main/scala/org/apache/spark/ml/Transformer.scala
 ##########
 @@ -79,7 +80,7 @@ abstract class Transformer extends PipelineStage {
  * result as a new column.
  */
 @DeveloperApi
-abstract class UnaryTransformer[IN, OUT, T <: UnaryTransformer[IN, OUT, T]]
+abstract class UnaryTransformer[IN: TypeTag, OUT: TypeTag, T <: 
UnaryTransformer[IN, OUT, T]]
 
 Review comment:
   I don't disagree, but this is trading a possible error for a definite error. 
In light of the recent conversations about not-breaking things, is this wise? 
(I don't object though.)
   
   Yes, let's restrict this to primitive types. I think Spark ML even uses some 
UDFs that accept AnyRef or something to work with tuples or triples, IIRC.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to