Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/18544#discussion_r202257183 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala --- @@ -1155,7 +1155,8 @@ class Analyzer( override def apply(plan: LogicalPlan): LogicalPlan = plan.transformAllExpressions { case f: UnresolvedFunction if !catalog.functionExists(f.name) => withPosition(f) { - throw new NoSuchFunctionException(f.name.database.getOrElse("default"), f.name.funcName) + val db = f.name.database.getOrElse(catalog.getCurrentDatabase) + throw new NoSuchFunctionException(db, f.name.funcName) --- End diff -- The issue has been resolved. Can you revert the changes?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org