-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-4819] Remove Guava's "Optional" from public API #10513
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
|
Test build #48427 has finished for PR 10513 at commit
|
|
Test build #48474 has finished for PR 10513 at commit
|
|
Test build #48477 has finished for PR 10513 at commit
|
|
This looks ok to me if we're ok with breaking source and binary compatibility in 2.0. I guess it's the less bad option to fix this without depending on Java 8... |
|
If we are creating our own Optional, why don't we also support all the methods available on Guava, so we only need to break "import" compatibility? |
|
My theory was that it makes it more compatible with Java 8 Optional. Later, moving to its implementation is a smaller change. We're taking the bigger change now. Or at least that was the motivation. Another possibility is to add the Guava work-alike methods and deprecate them. Later they'd be removed I guess when Java 8 Optional gets used. I liked that less since it still just half of the breaking change farther down the road, when a major release seems like the time to do as much of the breaking as possible. |
|
Test build #48605 has finished for PR 10513 at commit
|
|
But we might never switch to Java 8's Optional, or maybe the entire API that's depending Optional will be deprecated in the future. Why should we increase the level of breakage now in anticipation of something that we don't even know we need in the future? |
|
No matter what, there's a break now -- not even source-compatible. In for a penny, in for a pound, if it has a future benefit? but I agree it's unlikely to actually switch to the Java 8 |
|
Test build #48654 has finished for PR 10513 at commit
|
|
Test build #48850 has finished for PR 10513 at commit
|
|
Test build #2336 has finished for PR 10513 at commit
|
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.
we should probably have a better user-facing documentation in addition to this ...
|
Test build #48936 has finished for PR 10513 at commit
|
|
LGTM. Anything else you want to do? Otherwise we should remove WIP and merge it. |
|
It's ready as far as I'm concerned. |
|
Thanks - I'm going to merge this. |
|
Test FAILed. |
Replace Guava
Optionalwith (an API clone of) Java 8java.util.Optional(edit: and a clone of GuavaOptional)See also #10512