Skip to content

Commit

Permalink
Fix NoSuchFunctionException constructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed Nov 18, 2020
1 parent 2f50b0c commit b3ba28d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,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 @@ -77,8 +77,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 b3ba28d

Please sign in to comment.