Skip to content

Commit 4abd807

Browse files
committed
Fix the test for 'set -v'
1 parent 6e47e56 commit 4abd807

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,11 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
10921092
}.toSet
10931093
conf.clear()
10941094

1095+
val expectedConfs = conf.getAllDefinedConfs.map { case (key, defaultValue, doc) =>
1096+
s"$key\tdefault: $defaultValue\t$doc"
1097+
}
1098+
assertResult(expectedConfs)(sql("SET -v").collect().map(_(0)))
1099+
10951100
// "SET" itself returns all config variables currently specified in SQLConf.
10961101
// TODO: Should we be listing the default here always? probably...
10971102
assert(sql("SET").collect().size == 0)
@@ -1102,16 +1107,12 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
11021107

11031108
assert(hiveconf.get(testKey, "") == testVal)
11041109
assertResult(Set(testKey -> testVal))(collectResults(sql("SET")))
1105-
assertResult(Set(testKey -> testVal))(collectResults(sql("SET -v")))
11061110

11071111
sql(s"SET ${testKey + testKey}=${testVal + testVal}")
11081112
assert(hiveconf.get(testKey + testKey, "") == testVal + testVal)
11091113
assertResult(Set(testKey -> testVal, (testKey + testKey) -> (testVal + testVal))) {
11101114
collectResults(sql("SET"))
11111115
}
1112-
assertResult(Set(testKey -> testVal, (testKey + testKey) -> (testVal + testVal))) {
1113-
collectResults(sql("SET -v"))
1114-
}
11151116

11161117
// "SET key"
11171118
assertResult(Set(testKey -> testVal)) {

0 commit comments

Comments
 (0)