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

    https://github.com/apache/spark/pull/18527#discussion_r146650137
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala ---
    @@ -95,7 +95,10 @@ private[sql] class HiveSessionCatalog(
           } catch {
             case NonFatal(e) =>
               val analysisException =
    -            new AnalysisException(s"No handler for UDF/UDAF/UDTF 
'${clazz.getCanonicalName}': $e")
    +            new AnalysisException(s"No handler for UDF/UDAF/UDTF 
'${clazz.getCanonicalName}': $e" +
    +              s"\nIf you create a UDTF, please make sure your function 
override " +
    +              s"`public StructObjectInspector initialize(ObjectInspector[] 
args)`, " +
    +              s"per: SPARK-21101")
    --- End diff --
    
    ```Scala
              val noHandlerMsg = s"No handler for UDF/UDAF/UDTF 
'${clazz.getCanonicalName}': $e"
              val errorMsg =
                if (classOf[GenericUDTF].isAssignableFrom(clazz)) {
                  s"$noHandlerMsg\nPlease make sure your function overrides " +
                    "`public StructObjectInspector initialize(ObjectInspector[] 
args)`."
                } else {
                  noHandlerMsg
                }
              val analysisException = new AnalysisException(errorMsg)
    ```


---

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

Reply via email to