Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@

package org.apache.spark.sql

import java.util.{Locale, TimeZone}

import org.apache.spark.sql.catalyst.plans._
import org.apache.spark.sql.catalyst.util._
import org.apache.spark.sql.columnar.InMemoryRelation

class QueryTest extends PlanTest {

// Timezone is fixed to America/Los_Angeles for those timezone sensitive tests (timestamp_*)
TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"))
// Add Locale setting
Locale.setDefault(Locale.US)

/**
* Runs the plan and makes sure the answer contains all of the keywords, or the
* none of keywords are listed in the answer
Expand Down
12 changes: 0 additions & 12 deletions sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.spark.sql

import java.util.TimeZone

import org.apache.spark.sql.test.TestSQLContext
import org.scalatest.BeforeAndAfterAll

Expand All @@ -37,16 +35,6 @@ class SQLQuerySuite extends QueryTest with BeforeAndAfterAll {

import org.apache.spark.sql.test.TestSQLContext.implicits._

var origZone: TimeZone = _
override protected def beforeAll() {
origZone = TimeZone.getDefault
TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles"))
}

override protected def afterAll() {
TimeZone.setDefault(origZone)
}

test("SPARK-4625 support SORT BY in SimpleSQLParser & DSL") {
checkAnswer(
sql("SELECT a FROM testData2 SORT BY a"),
Expand Down