File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog
core/src/test/scala/org/apache/spark/sql/test
hive/src/main/scala/org/apache/spark/sql/hive/test Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1251,9 +1251,10 @@ class SessionCatalog(
12511251 dropTempFunction(func.funcName, ignoreIfNotExists = false )
12521252 }
12531253 }
1254- tempTables.clear ()
1254+ clearTempTables ()
12551255 globalTempViewManager.clear()
12561256 functionRegistry.clear()
1257+ tableRelationCache.invalidateAll()
12571258 // restore built-in functions
12581259 FunctionRegistry .builtin.listFunction().foreach { f =>
12591260 val expressionInfo = FunctionRegistry .builtin.lookupFunction(f)
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ trait SharedSQLContext extends SQLTestUtils with BeforeAndAfterEach with Eventua
7474 protected override def afterAll (): Unit = {
7575 super .afterAll()
7676 if (_spark != null ) {
77+ _spark.sessionState.catalog.reset()
7778 _spark.stop()
7879 _spark = null
7980 }
Original file line number Diff line number Diff line change @@ -488,14 +488,9 @@ private[hive] class TestHiveSparkSession(
488488
489489 sharedState.cacheManager.clearCache()
490490 loadedTables.clear()
491- sessionState.catalog.clearTempTables()
492- sessionState.catalog.tableRelationCache.invalidateAll()
493-
491+ sessionState.catalog.reset()
494492 metadataHive.reset()
495493
496- FunctionRegistry .getFunctionNames.asScala.filterNot(originalUDFs.contains(_)).
497- foreach { udfName => FunctionRegistry .unregisterTemporaryUDF(udfName) }
498-
499494 // HDFS root scratch dir requires the write all (733) permission. For each connecting user,
500495 // an HDFS scratch dir: ${hive.exec.scratchdir}/<username> is created, with
501496 // ${hive.scratch.dir.permission}. To resolve the permission issue, the simplest way is to
You can’t perform that action at this time.
0 commit comments