Yang Jie created SPARK-31997:
--------------------------------

             Summary: Should drop test_udtf table when SingleSessionSuite 
completed
                 Key: SPARK-31997
                 URL: https://issues.apache.org/jira/browse/SPARK-31997
             Project: Spark
          Issue Type: Bug
          Components: Tests
    Affects Versions: 3.0.0
            Reporter: Yang Jie


If we execute mvn test SingleSessionSuite and HiveThriftBinaryServerSuite in 
order,  the test case "SPARK-11595 ADD JAR with input path having URL scheme"  
in HiveThriftBinaryServerSuite will failed as following:

 
{code:java}
- SPARK-11595 ADD JAR with input path having URL scheme *** FAILED *** 
java.sql.SQLException: Error running query: 
org.apache.spark.sql.AnalysisException: Can not create the managed 
table('`default`.`test_udtf`'). The associated 
location('file:/home/yarn/spark_ut/spark_ut/baidu/inf-spark/spark-source/sql/hive-thriftserver/spark-warehouse/test_udtf')
 already exists.; at 
org.apache.hive.jdbc.HiveStatement.waitForOperationToComplete(HiveStatement.java:385)
 at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254) at 
org.apache.spark.sql.hive.thriftserver.HiveThriftBinaryServerSuite.$anonfun$new$65(HiveThriftServer2Suites.scala:603)
 at 
org.apache.spark.sql.hive.thriftserver.HiveThriftBinaryServerSuite.$anonfun$new$65$adapted(HiveThriftServer2Suites.scala:603)
 at scala.collection.immutable.List.foreach(List.scala:392) at 
org.apache.spark.sql.hive.thriftserver.HiveThriftBinaryServerSuite.$anonfun$new$63(HiveThriftServer2Suites.scala:603)
 at 
org.apache.spark.sql.hive.thriftserver.HiveThriftBinaryServerSuite.$anonfun$new$63$adapted(HiveThriftServer2Suites.scala:573)
 at 
org.apache.spark.sql.hive.thriftserver.HiveThriftJdbcTest.$anonfun$withMultipleConnectionJdbcStatement$3(HiveThriftServer2Suites.scala:1074)
 at 
org.apache.spark.sql.hive.thriftserver.HiveThriftJdbcTest.$anonfun$withMultipleConnectionJdbcStatement$3$adapted(HiveThriftServer2Suites.scala:1074)
 at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
{code}
 

because SingleSessionSuite do `create table test_udtf` and not drop it when 
test  complete and HiveThriftBinaryServerSuite want to re-create this table.

If we execute mvn test HiveThriftBinaryServerSuite and SingleSessionSuite in 
order,both test suites will succeed, but we shouldn't rely on their execution 
order

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to