@@ -19,13 +19,12 @@ package org.apache.spark.sql.hive
1919
2020import java .sql .Date
2121import java .util
22- import java .util .TimeZone
2322
2423import org .apache .hadoop .hive .serde2 .io .DoubleWritable
2524import org .apache .hadoop .hive .serde2 .objectinspector .primitive .PrimitiveObjectInspectorFactory
2625import org .apache .spark .sql .catalyst .types ._
2726import org .apache .spark .sql .catalyst .types .decimal .Decimal
28- import org .scalatest .{ BeforeAndAfterAll , FunSuite }
27+ import org .scalatest .FunSuite
2928
3029import org .apache .hadoop .hive .ql .udf .UDAFPercentile
3130import org .apache .hadoop .hive .serde2 .objectinspector .{ObjectInspector , StructObjectInspector , ObjectInspectorFactory }
@@ -34,18 +33,7 @@ import org.apache.hadoop.io.LongWritable
3433
3534import org .apache .spark .sql .catalyst .expressions .{Literal , Row }
3635
37- class HiveInspectorSuite extends FunSuite with HiveInspectors with BeforeAndAfterAll {
38- private val originalTimeZone = TimeZone .getDefault
39-
40- override def beforeAll () {
41- // Timezone is fixed to GMT
42- TimeZone .setDefault(TimeZone .getTimeZone(" GMT" ))
43- }
44-
45- override def afterAll () {
46- TimeZone .setDefault(originalTimeZone)
47- }
48-
36+ class HiveInspectorSuite extends FunSuite with HiveInspectors {
4937 test(" Test wrap SettableStructObjectInspector" ) {
5038 val udaf = new UDAFPercentile .PercentileLongEvaluator ()
5139 udaf.init()
@@ -84,7 +72,7 @@ class HiveInspectorSuite extends FunSuite with HiveInspectors with BeforeAndAfte
8472 Literal (0 .asInstanceOf [Float ]) ::
8573 Literal (0 .asInstanceOf [Double ]) ::
8674 Literal (" 0" ) ::
87- Literal (new Date (0 )) ::
75+ Literal (new Date (2014 , 9 , 23 )) ::
8876 Literal (Decimal (BigDecimal (123.123 ))) ::
8977 Literal (new java.sql.Timestamp (123123 )) ::
9078 Literal (Array [Byte ](1 ,2 ,3 )) ::
0 commit comments