Skip to content

Commit

Permalink
[SPARK-3291][SQL]TestcaseName in createQueryTest should not contain ":"
Browse files Browse the repository at this point in the history
":" 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 <[email protected]>

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

0e943a1 [qiping.lqp] rename golden file
60a863f [qiping.lqp] TestcaseName in createQueryTest should not contain ":"

(cherry picked from commit 634d04b)
Signed-off-by: Michael Armbrust <[email protected]>
  • Loading branch information
qiping.lqp authored and marmbrus committed Aug 29, 2014
1 parent 9bae345 commit c1333b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ abstract class HiveComparisonTest

val installHooksCommand = "(?i)SET.*hooks".r
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.
shardInfo.foreach {
case (shardId, numShards) if testCaseName.hashCode % numShards != shardId => return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")

test("case sensitivity: registered table") {
Expand Down

0 comments on commit c1333b8

Please sign in to comment.