Github user mt40 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22309#discussion_r226144119
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala 
---
    @@ -125,6 +125,17 @@ object ScalaReflection extends ScalaReflection {
         case _ => false
       }
     
    +  def isValueClass(tpe: `Type`): Boolean = {
    +    val notNull = !(tpe <:< localTypeOf[Null])
    +    notNull && definedByConstructorParams(tpe) && tpe <:< 
localTypeOf[AnyVal]
    --- End diff --
    
    No, now you ask this, I realize that the `Product` constraint can be 
completely removed.
    
    Also, after scanning through the type api, I found a [built-in 
way](isDerivedValueClass) to check for value class... Don't know why I never 
thought about this 🤦‍♂️


---

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

Reply via email to