You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jacek Laskowski (JIRA)" <ji...@apache.org> on 2017/03/31 07:35:41 UTC

[jira] [Created] (SPARK-20171) Analyzer should include the arity of a function when reporting "AnalysisException: Undefined function"

Jacek Laskowski created SPARK-20171:
---------------------------------------

             Summary: Analyzer should include the arity of a function when reporting "AnalysisException: Undefined function"
                 Key: SPARK-20171
                 URL: https://issues.apache.org/jira/browse/SPARK-20171
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.2.0
            Reporter: Jacek Laskowski
            Priority: Minor


{code}
scala> sql("SELECT cast(id, INT) FROM range(1)").queryExecution.analyzed
org.apache.spark.sql.AnalysisException: Undefined function: 'cast'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 1 pos 7
  at org.apache.spark.sql.catalyst.analysis.Analyzer$LookupFunctions$$anonfun$apply$13$$anonfun$applyOrElse$44.apply(Analyzer.scala:1130)
  at org.apache.spark.sql.catalyst.analysis.Analyzer$LookupFunctions$$anonfun$apply$13$$anonfun$applyOrElse$44.apply(Analyzer.scala:1130)
  at org.apache.spark.sql.catalyst.analysis.package$.withPosition(package.scala:48)
  at org.apache.spark.sql.catalyst.analysis.Analyzer$LookupFunctions$$anonfun$apply$13.applyOrElse(Analyzer.scala:1129)
  at org.apache.spark.sql.catalyst.analysis.Analyzer$LookupFunctions$$anonfun$apply$13.applyOrElse(Analyzer.scala:1127)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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