Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
16ca7ac
It compiles!!
Aug 4, 2015
5e6a20c
Refactor SQLTestUtils to reduce duplication
Aug 5, 2015
d1d1449
Remove HiveTest singleton
Aug 5, 2015
d4aafb1
Avoid the need to switch to HiveContexts
Aug 5, 2015
6345cee
Clean up JsonSuite
Aug 5, 2015
68ac6fe
Rename the test traits properly
Aug 5, 2015
b15fdc6
Stop SparkContext in Java SQL tests
Aug 5, 2015
0d74a72
Load test data early in case tables are accessed by name
Aug 5, 2015
eee415d
Refactor implicits into SQLTestUtils
Aug 10, 2015
55d0b1b
Fix Java not serializable exception in tests
Aug 10, 2015
4f59bee
Fix DataSourceTest et al.
Aug 10, 2015
88d4f16
Fix hive tests to use the same pattern
Aug 11, 2015
5fe4bfb
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 11, 2015
c4a22bc
Fix compile after resolving merge conflicts
Aug 11, 2015
d9a8390
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 11, 2015
f5619f8
Fix test compile after resolving merge conflicts
Aug 11, 2015
9395cfa
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 11, 2015
c51b3d8
Fix OuterJoinSuite
Aug 11, 2015
997715e
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 11, 2015
1400770
Fix style
Aug 11, 2015
c92a3b0
Fix MiMa
Aug 11, 2015
4debedf
Clean up inheritance in test util traits
Aug 11, 2015
ca87dda
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 11, 2015
1cf53ad
Create new context in SBT console by default
Aug 11, 2015
bc5c999
Fix SemiJoinSuite
Aug 12, 2015
19fd6c3
Fix InnerJoinSuite
Aug 12, 2015
e1e513e
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 12, 2015
1e4c321
Address comments
Aug 12, 2015
54848e2
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 12, 2015
94f9c77
Revert the removal of some BeforeAndAfters
Aug 12, 2015
bec7d28
Fix a hive test + minor format updates
Aug 12, 2015
24c086d
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 12, 2015
561eacc
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 12, 2015
aaba277
Fix places where we override before / after alls
Aug 12, 2015
aac8f7f
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 12, 2015
40959bb
Fix test
Aug 12, 2015
55d6624
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 12, 2015
4ed58c8
Revert a few merge-conflict-induced unintentional changes
Aug 12, 2015
0ce5638
Minor updates
Aug 13, 2015
814df2f
Add back singletons but deprecate them
Aug 13, 2015
099c74f
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 13, 2015
451fa37
Use consistent name for added back singletons
Aug 13, 2015
9ea7f7c
Fix style
Aug 13, 2015
ddc4b05
Revert "Use consistent name for added back singletons"
Aug 13, 2015
ece3a81
Remove TestSQLContext, but keep TestHive
Aug 13, 2015
94cc3b5
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 13, 2015
8d69bf8
Fix test
Aug 13, 2015
7a0b1ef
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 13, 2015
b58ae73
Fix tests
Aug 13, 2015
828144f
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 13, 2015
c4d44c9
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 13, 2015
48af8e4
Fix another before / after alls
Aug 13, 2015
0606c82
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 13, 2015
f599bbc
Revert all Hive related changes
Aug 13, 2015
aed7fc7
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 13, 2015
d85a6d8
Add a shorthand for sqlContext.sql / ctx.sql
Aug 13, 2015
0b60325
Fix hive test compile
Aug 13, 2015
821ea67
Merge branch 'master' of github.com:apache/spark into sql-tests-refactor
Aug 13, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename the test traits properly
MyTestSQLContext -> SharedSQLContext
MyTestHiveContext -> SharedHiveContext
LocalSQLContext -> TestSQLContext
TestData -> TestSQLData
  • Loading branch information
Andrew Or committed Aug 5, 2015
commit 68ac6fe3994cbe3aa4a51909cf9e130e8c46cfb1
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import org.scalatest.concurrent.Eventually._
import org.apache.spark.Accumulators
import org.apache.spark.sql.columnar._
import org.apache.spark.storage.{StorageLevel, RDDBlockId}
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

private case class BigData(s: String)

class CachedTableSuite extends QueryTest with MyTestSQLContext {
class CachedTableSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
package org.apache.spark.sql

import org.apache.spark.sql.functions._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types.DecimalType


class DataFrameAggregateSuite extends QueryTest with MyTestSQLContext {
class DataFrameAggregateSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
package org.apache.spark.sql

import org.apache.spark.sql.functions._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._

/**
* Test suite for functions in [[org.apache.spark.sql.functions]].
*/
class DataFrameFunctionsSuite extends QueryTest with MyTestSQLContext {
class DataFrameFunctionsSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

package org.apache.spark.sql

import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

class DataFrameImplicitsSuite extends QueryTest with MyTestSQLContext {
class DataFrameImplicitsSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package org.apache.spark.sql

import org.apache.spark.sql.execution.joins.BroadcastHashJoin
import org.apache.spark.sql.functions._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

class DataFrameJoinSuite extends QueryTest with MyTestSQLContext {
class DataFrameJoinSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package org.apache.spark.sql

import scala.collection.JavaConversions._

import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext


class DataFrameNaFunctionsSuite extends QueryTest with MyTestSQLContext {
class DataFrameNaFunctionsSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import java.util.Random
import org.scalatest.Matchers._

import org.apache.spark.sql.functions.col
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

class DataFrameStatSuite extends QueryTest with MyTestSQLContext {
class DataFrameStatSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import java.text.SimpleDateFormat

import org.apache.spark.sql.catalyst.util.DateTimeUtils
import org.apache.spark.sql.functions._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.unsafe.types.CalendarInterval

class DateFunctionsSuite extends QueryTest with MyTestSQLContext {
class DateFunctionsSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
4 changes: 2 additions & 2 deletions sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import org.scalatest.BeforeAndAfterEach

import org.apache.spark.sql.catalyst.analysis.UnresolvedRelation
import org.apache.spark.sql.execution.joins._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SQLTestUtils


class JoinSuite extends QueryTest with BeforeAndAfterEach with MyTestSQLContext {
class JoinSuite extends QueryTest with BeforeAndAfterEach with SQLTestUtils {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package org.apache.spark.sql

import org.scalatest.BeforeAndAfter

import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types.{BooleanType, StringType, StructField, StructType}

class ListTablesSuite extends QueryTest with BeforeAndAfter with MyTestSQLContext {
class ListTablesSuite extends QueryTest with BeforeAndAfter with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ package org.apache.spark.sql

import org.apache.spark.sql.functions._
import org.apache.spark.sql.functions.{log => logarithm}
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

private object MathExpressionsTestData {
case class DoubleData(a: java.lang.Double, b: java.lang.Double)
case class NullDoubles(a: java.lang.Double)
}

class MathExpressionsSuite extends QueryTest with MyTestSQLContext {
class MathExpressionsSuite extends QueryTest with SharedSQLContext {
import MathExpressionsTestData._

private val ctx = sqlContext
Expand Down
4 changes: 2 additions & 2 deletions sql/core/src/test/scala/org/apache/spark/sql/RowSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ package org.apache.spark.sql
import org.apache.spark.SparkFunSuite
import org.apache.spark.sql.execution.SparkSqlSerializer
import org.apache.spark.sql.catalyst.expressions.{GenericMutableRow, SpecificMutableRow}
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.unsafe.types.UTF8String

class RowSuite extends SparkFunSuite with MyTestSQLContext {
class RowSuite extends SparkFunSuite with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

package org.apache.spark.sql

import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext


class SQLConfSuite extends QueryTest with MyTestSQLContext {
class SQLConfSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
private val testKey = "test.key.0"
private val testVal = "test.val.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
package org.apache.spark.sql

import org.apache.spark.SparkFunSuite
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

class SQLContextSuite extends SparkFunSuite with MyTestSQLContext {
class SQLContextSuite extends SparkFunSuite with SharedSQLContext {
private val ctx = sqlContext

override def afterAll(): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package org.apache.spark.sql
import java.sql.{Date, Timestamp}

import org.apache.spark.SparkFunSuite
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

case class ReflectData(
stringField: String,
Expand Down Expand Up @@ -72,7 +72,7 @@ case class ComplexReflectData(
mapFieldContainsNull: Map[Int, Option[Long]],
dataField: Data)

class ScalaReflectionRelationSuite extends SparkFunSuite with MyTestSQLContext {
class ScalaReflectionRelationSuite extends SparkFunSuite with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package org.apache.spark.sql

import org.apache.spark.{SparkConf, SparkFunSuite}
import org.apache.spark.serializer.JavaSerializer
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

class SerializationSuite extends SparkFunSuite with MyTestSQLContext {
class SerializationSuite extends SparkFunSuite with SharedSQLContext {

test("[SPARK-5235] SQLContext should be serializable") {
val _sqlContext = new SQLContext(sqlContext.sparkContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
package org.apache.spark.sql

import org.apache.spark.sql.functions._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types.Decimal


class StringFunctionsSuite extends QueryTest with MyTestSQLContext {
class StringFunctionsSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.clearspring.analytics.stream.cardinality.HyperLogLog
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.catalyst.expressions.{OpenHashSetUDT, HyperLogLogUDT}
import org.apache.spark.sql.functions._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.util.Utils
import org.apache.spark.util.collection.OpenHashSet
Expand Down Expand Up @@ -67,7 +67,7 @@ private[sql] class MyDenseVectorUDT extends UserDefinedType[MyDenseVector] {
private[spark] override def asNullable: MyDenseVectorUDT = this
}

class UserDefinedTypeSuite extends QueryTest with MyTestSQLContext {
class UserDefinedTypeSuite extends QueryTest with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ package org.apache.spark.sql.columnar

import java.sql.{Date, Timestamp}

import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.sql.{QueryTest, Row}
import org.apache.spark.sql.test.SQLTestUtils
import org.apache.spark.sql.types._
import org.apache.spark.storage.StorageLevel.MEMORY_ONLY

class InMemoryColumnarQuerySuite extends QueryTest with MyTestSQLContext {
class InMemoryColumnarQuerySuite extends QueryTest with SQLTestUtils {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import org.scalatest.BeforeAndAfter

import org.apache.spark.SparkFunSuite
import org.apache.spark.sql._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

class PartitionBatchPruningSuite extends SparkFunSuite with BeforeAndAfter with MyTestSQLContext {
class PartitionBatchPruningSuite extends SparkFunSuite with BeforeAndAfter with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import org.apache.spark.SparkFunSuite
import org.apache.spark.sql.{DataFrame, DataFrameHolder, Row, SQLContext}
import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute
import org.apache.spark.sql.catalyst.util._
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

/**
* Base class for writing tests for individual physical operators. For an example of how this
* class's test helper methods can be used, see [[SortSuite]].
*/
private[sql] abstract class SparkPlanTest extends AbstractSparkPlanTest with MyTestSQLContext {
private[sql] abstract class SparkPlanTest extends AbstractSparkPlanTest with SharedSQLContext {
protected override def _sqlContext: SQLContext = sqlContext
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import java.sql.{Timestamp, Date}
import org.apache.spark.serializer.Serializer
import org.apache.spark.{ShuffleDependency, SparkFunSuite}
import org.apache.spark.sql.{MyDenseVectorUDT, QueryTest}
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.sql.Row

class SparkSqlSerializer2DataTypeSuite extends SparkFunSuite with MyTestSQLContext {
class SparkSqlSerializer2DataTypeSuite extends SparkFunSuite with SharedSQLContext {
// Make sure that we will not use serializer2 for unsupported data types.
def checkSupported(dataType: DataType, isSupported: Boolean): Unit = {
val testName =
Expand Down Expand Up @@ -65,7 +65,7 @@ class SparkSqlSerializer2DataTypeSuite extends SparkFunSuite with MyTestSQLConte
checkSupported(new MyDenseVectorUDT, isSupported = false)
}

abstract class SparkSqlSerializer2Suite extends QueryTest with MyTestSQLContext {
abstract class SparkSqlSerializer2Suite extends QueryTest with SharedSQLContext {
protected val ctx = sqlContext

var allColumns: String = _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.scalatest.Matchers
import org.apache.spark.sql.catalyst.expressions.UnsafeProjection
import org.apache.spark.{TaskContextImpl, TaskContext, SparkFunSuite}
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.unsafe.memory.{ExecutorMemoryManager, MemoryAllocator, TaskMemoryManager}
import org.apache.spark.unsafe.types.UTF8String
Expand All @@ -39,7 +39,7 @@ import org.apache.spark.unsafe.types.UTF8String
class UnsafeFixedWidthAggregationMapSuite
extends SparkFunSuite
with Matchers
with MyTestSQLContext {
with SharedSQLContext {

import UnsafeFixedWidthAggregationMap._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import org.apache.spark._
import org.apache.spark.sql.RandomDataGenerator
import org.apache.spark.sql.catalyst.{CatalystTypeConverters, InternalRow}
import org.apache.spark.sql.catalyst.expressions.{RowOrdering, UnsafeProjection, UnsafeRow}
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.unsafe.memory.{ExecutorMemoryManager, MemoryAllocator, TaskMemoryManager}

/**
* Test suite for [[UnsafeKVExternalSorter]], with randomly generated test data.
*/
class UnsafeKVExternalSorterSuite extends SparkFunSuite with MyTestSQLContext {
class UnsafeKVExternalSorterSuite extends SparkFunSuite with SharedSQLContext {
private val keyTypes = Seq(IntegerType, FloatType, DoubleType, StringType)
private val valueTypes = Seq(IntegerType, FloatType, DoubleType, StringType)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
package org.apache.spark.sql.execution.debug

import org.apache.spark.SparkFunSuite
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext

class DebuggingSuite extends SparkFunSuite with MyTestSQLContext {
class DebuggingSuite extends SparkFunSuite with SharedSQLContext {
private val ctx = sqlContext

test("DataFrame.debug()") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import org.h2.jdbc.JdbcSQLException
import org.scalatest.BeforeAndAfter

import org.apache.spark.SparkFunSuite
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.util.Utils

class JDBCSuite extends SparkFunSuite with BeforeAndAfter with MyTestSQLContext {
class JDBCSuite extends SparkFunSuite with BeforeAndAfter with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import org.scalatest.BeforeAndAfter

import org.apache.spark.SparkFunSuite
import org.apache.spark.sql.{SaveMode, Row}
import org.apache.spark.sql.test.MyTestSQLContext
import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.util.Utils

class JDBCWriteSuite extends SparkFunSuite with BeforeAndAfter with MyTestSQLContext {
class JDBCWriteSuite extends SparkFunSuite with BeforeAndAfter with SharedSQLContext {
private val ctx = sqlContext
import ctx.implicits._
import ctx._
Expand Down
Loading