Skip to content

Commit

Permalink
Fix NoSuchFunctionException constructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed May 23, 2019
1 parent e520366 commit 21a5f07
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class NoSuchPermanentFunctionException(db: String, func: String)

class NoSuchFunctionException(
msg: String,
cause: Option[Throwable] = None) extends AnalysisException(msg, cause = cause) {
cause: Option[Throwable]) extends AnalysisException(msg, cause = cause) {

import org.apache.spark.sql.catalog.v2.CatalogV2Implicits._

Expand All @@ -68,8 +68,8 @@ class NoSuchFunctionException(
s"a permanent function registered in the database '$db'.", cause = cause)
}

def this(identifier: Identifier, cause: Option[Throwable]) = {
this(s"Undefined function: ${identifier.quoted}", cause = cause)
def this(identifier: Identifier) = {
this(s"Undefined function: ${identifier.quoted}", cause = None)
}
}

Expand Down

0 comments on commit 21a5f07

Please sign in to comment.