Uh oh!
There was an error while loading. Please reload this page.
[SPARK-31010][SQL][FOLLOW-UP] Deprecate untyped scala UDF - #27794
Closed
Ngone51 wants to merge 2 commits into
Closed
[SPARK-31010][SQL][FOLLOW-UP] Deprecate untyped scala UDF#27794Ngone51 wants to merge 2 commits into
Ngone51 wants to merge 2 commits into
Conversation
SparkQA
commented
Mar 4, 2020
Test build #119321 has finished for PR 27794 at commit
|
Ngone51
commented
Mar 5, 2020
| * @since 2.0.0 | ||
| */ | ||
| @deprecated("Untyped scala UDF API is deprecated, " + | ||
| "please use typed scala UDF API instead.", "3.0.0") |
Contributor
There was a problem hiding this comment.
please use ... such as def udf[RT: TypeTag](f: Function0[RT]): UserDefinedFunction instead.
SparkQA
commented
Mar 5, 2020
Test build #119404 has finished for PR 27794 at commit
|
cloud-fan
commented
Mar 6, 2020
Contributor
thanks, merging to master/3.0! |
cloud-fan pushed a commit
that referenced
this pull request
Mar 6, 2020
### What changes were proposed in this pull request? Use scala annotation deprecate to deprecate untyped scala UDF. ### Why are the changes needed? After #27488, it's weird to see the untyped scala UDF will fail by default without deprecation. ### Does this PR introduce any user-facing change? Yes, user will see the warning: ``` <console>:26: warning: method udf in object functions is deprecated (since 3.0.0): Untyped Scala UDF API is deprecated, please use typed Scala UDF API such as 'def udf[RT: TypeTag](f: Function0[RT]): UserDefinedFunction' instead. val myudf = udf(() => Math.random(), DoubleType) ^ ``` ### How was this patch tested? Tested manually. Closes#27794 from Ngone51/deprecate_untyped_scala_udf. Authored-by: yi.wu <yi.wu@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit 587266f) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
sjincho pushed a commit
to sjincho/spark
that referenced
this pull request
Apr 15, 2020
### What changes were proposed in this pull request? Use scala annotation deprecate to deprecate untyped scala UDF. ### Why are the changes needed? After apache#27488, it's weird to see the untyped scala UDF will fail by default without deprecation. ### Does this PR introduce any user-facing change? Yes, user will see the warning: ``` <console>:26: warning: method udf in object functions is deprecated (since 3.0.0): Untyped Scala UDF API is deprecated, please use typed Scala UDF API such as 'def udf[RT: TypeTag](f: Function0[RT]): UserDefinedFunction' instead. val myudf = udf(() => Math.random(), DoubleType) ^ ``` ### How was this patch tested? Tested manually. Closesapache#27794 from Ngone51/deprecate_untyped_scala_udf. Authored-by: yi.wu <yi.wu@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Use scala annotation @deprecate to deprecate untyped scala UDF.
Why are the changes needed?
After #27488, it's weird to see the untyped scala UDF will fail by default without deprecation.
Does this PR introduce any user-facing change?
Yes, user will see the warning:
How was this patch tested?
Tested manually.