Uh oh!
There was an error while loading. Please reload this page.
[SPARK-25362][JavaAPI] Replace Spark Optional class with Java Optional - #22383
[SPARK-25362][JavaAPI] Replace Spark Optional class with Java Optional#22383mmolimar wants to merge 7 commits into
Conversation
vanzin
commented
Sep 10, 2018
We can't do this until we decide whether the next version will be a major version or not. This breaks backwards compatibility. (See the bug I duplicated your bug to.) |
srowen
commented
Sep 10, 2018
Yeah this is the right kind of change but needs to wait for now. Can you update the title? |
mmolimar
commented
Sep 11, 2018
Done @srowen |
srowen
left a comment
There was a problem hiding this comment.
@mmolimar we can move forward with this now. Can you put SPARK-25395 in the title instead? that was the original JIRA.
| new Tuple2<>(4, 'w') | ||
| )); | ||
| List<Tuple2<Integer,Tuple2<Integer,Optional<Character>>>> joined = | ||
| List<Tuple2<Integer,Tuple2<Integer,Optional<Character>>>> joined = |
mmolimar
commented
Oct 11, 2018
Updated @srowen |
srowen
commented
Oct 11, 2018
Oops, I mean SPARK-25362. SPARK-25395 was a duplicate. |
mmolimar
commented
Oct 11, 2018
No problem. Done ;-) |
SparkQA
commented
Oct 11, 2018
Test build #4368 has finished for PR 22383 at commit
|
srowen
commented
Oct 11, 2018
Yeah, you'll have to add this to the 3.0 excludes section of project/MimaExcludes:
|
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Oct 13, 2018
Test build #4376 has finished for PR 22383 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Oct 16, 2018
Test build #4379 has finished for PR 22383 at commit
|
srowen
commented
Oct 16, 2018
Oh, hm: So Unless someone has a bright idea I think we can't do this. Same reason I was unable to change Spark to use |
mmolimar
commented
Oct 18, 2018
I agree @srowen. |
vanzin
commented
Oct 18, 2018
Spark's class only reason to exist is so we do not use the Guava class, since everyone and their pet want to use a different version of Guava (and Spark shades it for that reason). |
srowen
commented
Oct 18, 2018
Yeah, I think we just can't do this unfortunately. It was worth looking into. |
Closesapache#22567Closesapache#18457Closesapache#21517Closesapache#21858Closesapache#22383Closesapache#19219Closesapache#22401Closesapache#22811Closesapache#20405Closesapache#21933Closesapache#22819 from srowen/ClosePRs. Authored-by: Sean Owen <sean.owen@databricks.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
What changes were proposed in this pull request?
Previous Spark versions didn't require Java 8 and an
OptionalSpark Java API had to be implemented to support optional values.Since Spark 2.4 uses Java 8, the
OptionalSpark Java API should be removed so that Spark uses the original Java API.How was this patch tested?
OptionalSuiteclass was removed to test Spark Java APIOptionalclass (this class as well).Notice that the
getmethod in the Spark Java APIOptionalclass throws aNullPointerExceptionwhen the value is not set whereas the native Java APIjava.util.Optionalthrows aNoSuchElementException.