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

    https://github.com/apache/spark/pull/21770#discussion_r202548556
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
 ---
    @@ -1588,6 +1588,15 @@ object CodeGenerator extends Logging {
     
       def primitiveTypeName(dt: DataType): String = 
primitiveTypeName(javaType(dt))
     
    +  def getClassName(cls: Class[_]): String = {
    +    try {
    +      return Option(cls.getCanonicalName).getOrElse(cls.getName)
    +    } catch {
    +      case err: InternalError =>
    --- End diff --
    
    What would cause InternalError here? just wondering if there's a cleaner 
way.
    Will `getCanonicalName` ever return null? otherwise seems like you don't 
need to fall back to `getName` above. Also `return` isn't needed below?


---

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

Reply via email to