-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25908][SQL][FOLLOW-UP] Add back unionAll #23131
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 4 commits
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 |
|---|---|---|
|
|
@@ -341,8 +341,6 @@ displayTitle: Spark SQL Upgrading Guide | |
| APIs. Instead, `DataFrame` remains the primary programming abstraction, which is analogous to the | ||
| single-node data frame notion in these languages. | ||
|
|
||
| - Dataset and DataFrame API `unionAll` has been deprecated and replaced by `union` | ||
|
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. Ur, we cannot change the history. Until Spark 2.4.0, we are showing the deprecation warning. scala> spark.version
res2: String = 2.4.0
scala> df.unionAll(df2)
<console>:28: warning: method unionAll in class Dataset is deprecated: use union()
df.unionAll(df2)
^Shall we keep the history in this specific migration doc,
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. That's my fault for making this suggestion. Yeah maybe best to leave this statement, and add a note here or the the 3.0 migration guide that it has been subsequently un-deprecated |
||
|
|
||
| - Dataset and DataFrame API `explode` has been deprecated, alternatively, use `functions.explode()` with `select` or `flatMap` | ||
|
|
||
| - Dataset and DataFrame API `registerTempTable` has been deprecated and replaced by `createOrReplaceTempView` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1852,6 +1852,20 @@ class Dataset[T] private[sql]( | |
| CombineUnions(Union(logicalPlan, other.logicalPlan)) | ||
| } | ||
|
|
||
| /** | ||
| * Returns a new Dataset containing union of rows in this Dataset and another Dataset. | ||
|
Contributor
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. say that this is an alias of union.
Member
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. Done. |
||
| * This is an alias for `union`. | ||
| * | ||
| * This is equivalent to `UNION ALL` in SQL. To do a SQL-style set union (that does | ||
| * deduplication of elements), use this function followed by a [[distinct]]. | ||
| * | ||
| * Also as standard in SQL, this function resolves columns by position (not by name). | ||
| * | ||
| * @group typedrel | ||
| * @since 2.0.0 | ||
| */ | ||
| def unionAll(other: Dataset[T]): Dataset[T] = union(other) | ||
|
|
||
| /** | ||
| * Returns a new Dataset containing union of rows in this Dataset and another Dataset. | ||
| * | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
If the goal is for this to be like other *All, this should go into a separate doc page, plus seealso, example etc.
The way this was written, as it was a deprecated function, this doc page merged with union - as it is committed now, none of the text above will show up and also unionAll will not be listed in method index list.
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.
also backtick doesn't format with roxygen2. this should be
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.
I see. Instead of directly copying the comments back, we should follow intersectAll. Opened a ticket: https://issues.apache.org/jira/browse/SPARK-26189