imback82 commented on a change in pull request #30270:
URL: https://github.com/apache/spark/pull/30270#discussion_r520047979



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
##########
@@ -496,7 +496,10 @@ private[hive] class TestHiveSparkSession(
   def getLoadedTables: collection.mutable.HashSet[String] = 
sharedState.loadedTables
 
   def loadTestTable(name: String): Unit = {
-    if (!sharedState.loadedTables.contains(name)) {
+    // LOAD DATA does not work on temporary views. Since temporary views are 
resolved first,
+    // skip loading if there exists a temporary view with the given name.

Review comment:
       There are test suites (full list 
[here](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/130704/testReport/))
 that use the same name for temporary view and table (for example, `src`) and 
that those predefined tables will be loaded in this `def`:
   
https://github.com/apache/spark/blob/8113c88542ee282b510c7e046d64df1761a85d14/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala#L336-L338
   , leading to an exception thrown since `LOAD DATA` doesn't work with 
temporary views.




----------------------------------------------------------------
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]

Reply via email to