You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/17 14:49:14 UTC

[GitHub] [spark] srowen commented on a change in pull request #27488: [SPARK-26580][SQL][ML][FOLLOW-UP] Throw exception when use untyped UDF by default

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:
users@infra.apache.org


With regards,
Apache Git Services

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