Skip to content
Snippets Groups Projects
Commit 634d04b8 authored by qiping.lqp's avatar qiping.lqp Committed by Michael Armbrust
Browse files

[SPARK-3291][SQL]TestcaseName in createQueryTest should not contain ":"

":" is not allowed to appear in a file name of Windows system. If file name contains ":", this file can't be checked out in a Windows system and developers using Windows must be careful to not commit the deletion of such files, Which is very inconvenient.

Author: qiping.lqp <qiping.lqp@alibaba-inc.com>

Closes #2191 from chouqin/querytest and squashes the following commits:

0e943a1 [qiping.lqp] rename golden file
60a863f [qiping.lqp] TestcaseName in createQueryTest should not contain ":"
parent d94a44d7
No related branches found
No related tags found
No related merge requests found
...@@ -195,6 +195,9 @@ abstract class HiveComparisonTest ...@@ -195,6 +195,9 @@ abstract class HiveComparisonTest
val installHooksCommand = "(?i)SET.*hooks".r val installHooksCommand = "(?i)SET.*hooks".r
def createQueryTest(testCaseName: String, sql: String, reset: Boolean = true) { def createQueryTest(testCaseName: String, sql: String, reset: Boolean = true) {
// testCaseName must not contain ':', which is not allowed to appear in a filename of Windows
assert(!testCaseName.contains(":"))
// If test sharding is enable, skip tests that are not in the correct shard. // If test sharding is enable, skip tests that are not in the correct shard.
shardInfo.foreach { shardInfo.foreach {
case (shardId, numShards) if testCaseName.hashCode % numShards != shardId => return case (shardId, numShards) if testCaseName.hashCode % numShards != shardId => return
......
...@@ -309,7 +309,7 @@ class HiveQuerySuite extends HiveComparisonTest { ...@@ -309,7 +309,7 @@ class HiveQuerySuite extends HiveComparisonTest {
} }
} }
createQueryTest("case sensitivity: Hive table", createQueryTest("case sensitivity when query Hive table",
"SELECT srcalias.KEY, SRCALIAS.value FROM sRc SrCAlias WHERE SrCAlias.kEy < 15") "SELECT srcalias.KEY, SRCALIAS.value FROM sRc SrCAlias WHERE SrCAlias.kEy < 15")
test("case sensitivity: registered table") { test("case sensitivity: registered table") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment