Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/13392#discussion_r65122821
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/internal/SQLConfSuite.scala ---
@@ -17,13 +17,36 @@
package org.apache.spark.sql.internal
+import org.scalatest.BeforeAndAfterAll
+
import org.apache.spark.sql.{QueryTest, Row, SparkSession, SQLContext}
+import org.apache.spark.sql.execution.WholeStageCodegenExec
import org.apache.spark.sql.test.{SharedSQLContext, TestSQLContext}
-class SQLConfSuite extends QueryTest with SharedSQLContext {
+class SQLConfSuite extends QueryTest with SharedSQLContext with
BeforeAndAfterAll {
+ import testImplicits._
+
private val testKey = "test.key.0"
private val testVal = "test.val.0"
+ override def beforeAll() {
+ super.beforeAll()
+ sql("DROP TABLE IF EXISTS testData")
+ spark
+ .range(10)
+ .select('id as 'a, 'id as 'b, 'id as 'c, 'id as 'd)
+ .write
+ .saveAsTable("testData")
--- End diff --
instead of creating this table in `beforeAll`, can we create it just in the
test case?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]