Skip to content

Commit f7421b4

Browse files
cloud-fanyaooqinn
authored andcommitted
[SPARK-42861][SQL] Use private[sql] instead of protected[sql] to avoid generating API doc
### What changes were proposed in this pull request? This is the only issue I found during SQL module API auditing via apache/spark-website@6159860 . Somehow `protected[sql]` also generates API doc which is unexpected. `private[sql]` solves the problem and I generated doc locally to verify it. Another API issue has been fixed by apache#40499 ### Why are the changes needed? fix api doc ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? N/A Closes apache#40541 from cloud-fan/auditing. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Kent Yao <[email protected]>
1 parent 18cd801 commit f7421b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RuntimeConfig private[sql](sqlConf: SQLConf = new SQLConf) {
6464
/**
6565
* Sets the given Spark runtime configuration property.
6666
*/
67-
protected[sql] def set[T](entry: ConfigEntry[T], value: T): Unit = {
67+
private[sql] def set[T](entry: ConfigEntry[T], value: T): Unit = {
6868
requireNonStaticConf(entry.key)
6969
sqlConf.setConf(entry, value)
7070
}
@@ -94,18 +94,18 @@ class RuntimeConfig private[sql](sqlConf: SQLConf = new SQLConf) {
9494
* Returns the value of Spark runtime configuration property for the given key.
9595
*/
9696
@throws[NoSuchElementException]("if the key is not set")
97-
protected[sql] def get[T](entry: ConfigEntry[T]): T = {
97+
private[sql] def get[T](entry: ConfigEntry[T]): T = {
9898
sqlConf.getConf(entry)
9999
}
100100

101-
protected[sql] def get[T](entry: OptionalConfigEntry[T]): Option[T] = {
101+
private[sql] def get[T](entry: OptionalConfigEntry[T]): Option[T] = {
102102
sqlConf.getConf(entry)
103103
}
104104

105105
/**
106106
* Returns the value of Spark runtime configuration property for the given key.
107107
*/
108-
protected[sql] def get[T](entry: ConfigEntry[T], default: T): T = {
108+
private[sql] def get[T](entry: ConfigEntry[T], default: T): T = {
109109
sqlConf.getConf(entry, default)
110110
}
111111

@@ -153,7 +153,7 @@ class RuntimeConfig private[sql](sqlConf: SQLConf = new SQLConf) {
153153
/**
154154
* Returns whether a particular key is set.
155155
*/
156-
protected[sql] def contains(key: String): Boolean = {
156+
private[sql] def contains(key: String): Boolean = {
157157
sqlConf.contains(key)
158158
}
159159

0 commit comments

Comments
 (0)