-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[SPARK-49249][SPARK-49122][Connect][SQL] Add addArtifact
API to the Spark SQL Core
#47631
Conversation
addArtifact
API to the Spark SQL Core
sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
Outdated
Show resolved
Hide resolved
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.
Look pretty good!
@xupefei can you check if this works with UDFs? |
addArtifact
API to the Spark SQL CoreaddArtifact
API to the Spark SQL Core
I checked and found it doesn't work. The Spark Core session is currently not using the class loader provided by ArtifactManager: spark/common/utils/src/main/scala/org/apache/spark/util/SparkClassUtils.scala Lines 28 to 47 in 11b682c
For now we have to wrap the code with |
# Conflicts: # connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/CheckConnectJvmClientCompatibility.scala
sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
Outdated
Show resolved
Hide resolved
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.
One small nit...
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.
LGTM
# Conflicts: # sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
…Artifact` API ### What changes were proposed in this pull request? This PR is a follow-up of #47631 which adds a docstring to the `addArtifact` API. The doc was missing from the previous PR. ### Why are the changes needed? The previous PR missed a docstring. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Not needed. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47974 from xupefei/add-artifact-doc. Authored-by: Paddy Xu <xupaddy@gmail.com> Signed-off-by: Herman van Hovell <herman@databricks.com>
… Spark SQL Core ### What changes were proposed in this pull request? This PR improves Spark SQL Core by adding a bunch of `addArtifact` APIs to `SparkSession`. These APIs were first introduced to Spark Connect a while ago. The follow-up task is for PySpark. ### Why are the changes needed? To close the API compatibility gap between Spark Connect and Spark Classic. ### Does this PR introduce _any_ user-facing change? Yes, users will be able to use some new APIs. ### How was this patch tested? Added new tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#47631 from xupefei/core-add-artifact. Authored-by: Paddy Xu <xupaddy@gmail.com> Signed-off-by: Herman van Hovell <herman@databricks.com>
…Artifact` API ### What changes were proposed in this pull request? This PR is a follow-up of apache#47631 which adds a docstring to the `addArtifact` API. The doc was missing from the previous PR. ### Why are the changes needed? The previous PR missed a docstring. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Not needed. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#47974 from xupefei/add-artifact-doc. Authored-by: Paddy Xu <xupaddy@gmail.com> Signed-off-by: Herman van Hovell <herman@databricks.com>
What changes were proposed in this pull request?
This PR improves Spark SQL Core by adding a bunch of
addArtifact
APIs toSparkSession
. These APIs were first introduced to Spark Connect a while ago.The follow-up task is for PySpark.
Why are the changes needed?
To close the API compatibility gap between Spark Connect and Spark Classic.
Does this PR introduce any user-facing change?
Yes, users will be able to use some new APIs.
How was this patch tested?
Added new tests.
Was this patch authored or co-authored using generative AI tooling?
No.