-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-39520][SQL] Override -- method for ExpressionSet in Scala 2.13
#36925
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
Conversation
-- method for Scala 2.13 ExpressionSet-- method for ExpressionSet in Scala 2.13
-- method for ExpressionSet in Scala 2.13 -- method to ExpressionSet in Scala 2.13
-- method to ExpressionSet in Scala 2.13 -- method for ExpressionSet in Scala 2.13
|
cc @HyukjinKwon |
|
run All test passed |
| that.iterator.foreach(newSet.remove) | ||
| newSet | ||
| } | ||
|
|
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.
++ doesn't have this issue?
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.
Yes, ++ no such issue and ExpressionSetSuite already covered ++
|
Merged to master. It looks like this wasn't a problem in 3.3.x; this change removed the overrides: https://issues.apache.org/jira/browse/SPARK-38836 I wonder if we will have other similar issues -- sounds like ++ is OK. CCing @minyyy |
The default implementation of def concat(that: collection.IterableOnce[A]): C = fromSpecific(that match {
case that: collection.Iterable[A] => new View.Concat(this, that)
case _ => iterator.concat(that.iterator)
})So the semantics of override def concat(that: collection.IterableOnce[Expression]): ExpressionSet = {
val newSet = clone()
that.iterator.foreach(newSet.add)
newSet
}for example: default implementation: override |
|
Other things were removed, like the override of union(). May be fine, just now seems to be worth another look |
What changes were proposed in this pull request?
Left ExpressionSet-- Right ExpressionSetin Scala 2.13 will use default--ofscala.collection.Setas follows:The
Left ExpressionSetwill convert to aimmutable.Setand theExpressionSetcannot override theremovedAllmethod ofimmutable.Setdue to it's ascala.collection.Set.So this pr override
--method forExpressionSetin Scala 2.13 to to take over the action to ensure it return the same result as Scala 2.12.Why are the changes needed?
Bug fix for Scala 2.13
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Before
After