-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-49413][CONNECT][SQL] Create a shared RuntimeConfig interface #47980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ceb734f
666c139
82eb245
7e28a54
9bb229f
10499c8
a883355
bd30913
8400e87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,6 +160,10 @@ object MimaExcludes { | |
| ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.DataFrameWriterV2"), | ||
| ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.WriteConfigMethods"), | ||
|
|
||
| // SPARK-49413: Create a shared RuntimeConfig interface. | ||
| ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.RuntimeConfig"), | ||
| ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.RuntimeConfig$"), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ya, this looks like a real breaking change indeed from Spark SQL part.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it is not. The org.apache.spark.sql.RuntimeConfig class is still there. It was just moved. MiMa - unfortunately - cannot deal with that.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ya, got it. So, there is no breaking change effectively because it's in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a comment here as a follow-up, please, @hvanhovell ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure I will create a follow-up. |
||
|
|
||
| // SPARK-49287: Shared Streaming interfaces | ||
| ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.scheduler.SparkListenerEvent"), | ||
| ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.ForeachWriter"), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.spark.sql | ||
|
|
||
| import org.apache.spark.annotation.Stable | ||
|
|
||
| /** | ||
| * Runtime configuration interface for Spark. To access this, use `SparkSession.conf`. | ||
| * | ||
| * Options set here are automatically propagated to the Hadoop configuration during I/O. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| @Stable | ||
| abstract class RuntimeConfig { | ||
|
|
||
| /** | ||
| * Sets the given Spark runtime configuration property. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| def set(key: String, value: String): Unit | ||
|
|
||
| /** | ||
| * Sets the given Spark runtime configuration property. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| def set(key: String, value: Boolean): Unit = { | ||
| set(key, value.toString) | ||
| } | ||
|
|
||
| /** | ||
| * Sets the given Spark runtime configuration property. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| def set(key: String, value: Long): Unit = { | ||
| set(key, value.toString) | ||
| } | ||
|
|
||
| /** | ||
| * Returns the value of Spark runtime configuration property for the given key. | ||
| * | ||
| * @throws java.util.NoSuchElementException | ||
| * if the key is not set and does not have a default value | ||
| * @since 2.0.0 | ||
| */ | ||
| @throws[NoSuchElementException]("if the key is not set") | ||
| def get(key: String): String | ||
|
|
||
| /** | ||
| * Returns the value of Spark runtime configuration property for the given key. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| def get(key: String, default: String): String | ||
|
|
||
| /** | ||
| * Returns all properties set in this conf. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| def getAll: Map[String, String] | ||
|
|
||
| /** | ||
| * Returns the value of Spark runtime configuration property for the given key. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| def getOption(key: String): Option[String] | ||
|
|
||
| /** | ||
| * Resets the configuration property for the given key. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| def unset(key: String): Unit | ||
|
|
||
| /** | ||
| * Indicates whether the configuration property with the given key is modifiable in the current | ||
| * session. | ||
| * | ||
| * @return | ||
| * `true` if the configuration property is modifiable. For static SQL, Spark Core, invalid | ||
| * (not existing) and other non-modifiable configuration properties, the returned value is | ||
| * `false`. | ||
| * @since 2.4.0 | ||
| */ | ||
| def isModifiable(key: String): Boolean | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a breaking change at API level.
@since 3.4.0tag becauseConnectRuntimeConfigonly exists after 4.0.0.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is not part of the public API. It is in internal, which is not public API. Regarding the tag I am not sure, that class has existed since 3.4.0. It just got renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To @hvanhovell . The previous
RuntimeConfigis a documented public API.