Skip to content

Commit 336a331

Browse files
committed
Address comments.
1 parent 37ebae4 commit 336a331

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/sql-migration-guide-upgrade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ displayTitle: Spark SQL Upgrading Guide
1717

1818
- The `ADD JAR` command previously returned a result set with the single value 0. It now returns an empty result set.
1919

20-
- In Spark version 2.4 and earlier, the `SET` command works without any warnings even if the specified key is for `SparkConf` entries and it has no effect because the command does not update `SparkConf`, but the behavior might confuse users. Since 3.0, the command fails if the key is for `SparkConf` as same as for static sql config keys. You can disable such a check by setting `spark.sql.execution.setCommandRejectsSparkConfs` to `false`.
20+
- In Spark version 2.4 and earlier, the `SET` command works without any warnings even if the specified key is for `SparkConf` entries and it has no effect because the command does not update `SparkConf`, but the behavior might confuse users. Since 3.0, the command fails if a non-SQL or static SQL config key is used. You can disable such a check by setting `spark.sql.execution.setCommandRejectsSparkConfs` to `false`.
2121

2222
## Upgrading From Spark SQL 2.3 to 2.4
2323

sql/core/src/main/scala/org/apache/spark/sql/RuntimeConfig.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class RuntimeConfig private[sql](sqlConf: SQLConf = new SQLConf) {
156156
}
157157
if (sqlConf.setCommandRejectsSparkConfs &&
158158
ConfigEntry.findEntry(key) != null && !SQLConf.sqlConfEntries.containsKey(key)) {
159-
throw new AnalysisException(s"Cannot modify the value of a spark config: $key")
159+
throw new AnalysisException(s"Cannot modify the value of a Spark config: $key")
160160
}
161161
}
162162
}

sql/core/src/test/scala/org/apache/spark/sql/RuntimeConfigSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ class RuntimeConfigSuite extends SparkFunSuite {
7575
val ex = intercept[AnalysisException] {
7676
conf.set("spark.task.cpus", 4)
7777
}
78-
assert(ex.getMessage.contains("spark config"))
78+
assert(ex.getMessage.contains("Spark config"))
7979
}
8080
}

sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2720,6 +2720,6 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
27202720
val ex = intercept[AnalysisException] {
27212721
sql("SET spark.task.cpus = 4")
27222722
}
2723-
assert(ex.getMessage.contains("spark config"))
2723+
assert(ex.getMessage.contains("Spark config"))
27242724
}
27252725
}

0 commit comments

Comments
 (0)