viirya commented on a change in pull request #29667:
URL: https://github.com/apache/spark/pull/29667#discussion_r484622184
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/SQLExecutionSuite.scala
##########
@@ -119,6 +125,37 @@ class SQLExecutionSuite extends SparkFunSuite {
spark.stop()
}
+
+ test("SPARK-32813: Table scan should work in different thread") {
+ val executor1 = Executors.newSingleThreadExecutor()
+ val executor2 = Executors.newSingleThreadExecutor()
+ SparkSession.cleanupAnyExistingSession()
+
+ withTempDir { tempDir =>
+ try {
+ val tablePath = tempDir.toString + "/table"
+ val df = ThreadUtils.awaitResult(Future {
+ val session =
SparkSession.builder().appName("test").master("local[*]").getOrCreate()
Review comment:
Actually my first commit is to get confs from default session if no
active session is found. In this case, default session is set to the active
session of first thread.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]