@@ -41,6 +41,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
4141 private val originalInMemoryPartitionPruning = TestHive .conf.inMemoryPartitionPruning
4242 private val originalCrossJoinEnabled = TestHive .conf.crossJoinEnabled
4343 private val originalSessionLocalTimeZone = TestHive .conf.sessionLocalTimeZone
44+ private val originalUseLegacyDateTimeParser = TestHive .conf.legacyTimeParserEnabled
4445
4546 def testCases : Seq [(String , File )] = {
4647 hiveQueryDir.listFiles.map(f => f.getName.stripSuffix(" .q" ) -> f)
@@ -49,8 +50,8 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
4950 override def beforeAll () {
5051 super .beforeAll()
5152 TestHive .setCacheTables(true )
52- // Timezone is fixed to GMT for those timezone sensitive tests (timestamp_*)
53- TimeZone .setDefault(TimeZone .getTimeZone(" GMT " ))
53+ // Timezone is fixed to America/Los_Angeles for those timezone sensitive tests (timestamp_*)
54+ TimeZone .setDefault(TimeZone .getTimeZone(" America/Los_Angeles " ))
5455 // Add Locale setting
5556 Locale .setDefault(Locale .US )
5657 // Set a relatively small column batch size for testing purposes
@@ -62,6 +63,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
6263 // Fix session local timezone to America/Los_Angeles for those timezone sensitive tests
6364 // (timestamp_*)
6465 TestHive .setConf(SQLConf .SESSION_LOCAL_TIMEZONE , " America/Los_Angeles" )
66+ TestHive .setConf(SQLConf .LEGACY_TIME_PARSER_ENABLED , true )
6567 RuleExecutor .resetMetrics()
6668 }
6769
@@ -74,6 +76,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
7476 TestHive .setConf(SQLConf .IN_MEMORY_PARTITION_PRUNING , originalInMemoryPartitionPruning)
7577 TestHive .setConf(SQLConf .CROSS_JOINS_ENABLED , originalCrossJoinEnabled)
7678 TestHive .setConf(SQLConf .SESSION_LOCAL_TIMEZONE , originalSessionLocalTimeZone)
79+ TestHive .setConf(SQLConf .LEGACY_TIME_PARSER_ENABLED , originalUseLegacyDateTimeParser)
7780
7881 // For debugging dump some statistics about how much time was spent in various optimizer rules
7982 logWarning(RuleExecutor .dumpTimeSpent())
0 commit comments