File tree Expand file tree Collapse file tree
main/scala/org/apache/spark/sql/catalyst/catalog
test/scala/org/apache/spark/sql/catalyst/catalog Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import scala.collection.JavaConverters._
2424import org .apache .spark .sql .AnalysisException
2525import org .apache .spark .sql .catalyst .{CatalystConf , SimpleCatalystConf }
2626import org .apache .spark .sql .catalyst .{FunctionIdentifier , TableIdentifier }
27- import org .apache .spark .sql .catalyst .analysis .{EmptyFunctionRegistry , FunctionRegistry }
27+ import org .apache .spark .sql .catalyst .analysis .{FunctionRegistry , SimpleFunctionRegistry }
2828import org .apache .spark .sql .catalyst .analysis .FunctionRegistry .FunctionBuilder
2929import org .apache .spark .sql .catalyst .expressions .{Expression , ExpressionInfo }
3030import org .apache .spark .sql .catalyst .plans .logical .{LogicalPlan , SubqueryAlias }
@@ -47,7 +47,7 @@ class SessionCatalog(
4747
4848 // For testing only.
4949 def this (externalCatalog : ExternalCatalog ) {
50- this (externalCatalog, EmptyFunctionRegistry )
50+ this (externalCatalog, new SimpleFunctionRegistry )
5151 }
5252
5353 protected [this ] val tempTables = new ConcurrentHashMap [String , LogicalPlan ]
Original file line number Diff line number Diff line change @@ -821,7 +821,7 @@ class SessionCatalogSuite extends SparkFunSuite {
821821 // If no database is specified, we'll first rename temporary functions
822822 sessionCatalog.createFunction(newFunc(" func1" , Some (" db2" )))
823823 sessionCatalog.renameFunction(FunctionIdentifier (" func1" ), FunctionIdentifier (" func4" ))
824- assert(sessionCatalog.getTempFunction(" func4" ) == tempFunc)
824+ assert(sessionCatalog.getTempFunction(" func4" ) == Some ( tempFunc) )
825825 assert(sessionCatalog.getTempFunction(" func1" ) == None )
826826 assert(externalCatalog.listFunctions(" db2" , " *" ).toSet == Set (" func1" , " func3" ))
827827 // Then, if no such temporary function exist, rename the function in the current database
You can’t perform that action at this time.
0 commit comments