[MINOR]Remove unnecessary gets when getting a value from map.#23901
[MINOR]Remove unnecessary gets when getting a value from map.#2390110110346 wants to merge 1 commit intoapache:masterfrom
Conversation
|
BTW, how did you find those instances? |
Thanks, I found those using |
|
I haven;t take a super close look but looks fine. |
|
Test build #102809 has finished for PR 23901 at commit
|
vanzin
left a comment
There was a problem hiding this comment.
Normally I find these changes pretty pointless. There's nothing wrong with the existing code. Unless you're actually making other changes around the code being modified here, I'd just leave things as is.
There was a problem hiding this comment.
Instead of just following what your IDE says, you could actually have simplified this whole block of code.
77950e8 to
765be91
Compare
|
Test build #102845 has finished for PR 23901 at commit
|
srowen
left a comment
There was a problem hiding this comment.
Yeah I agree with this kind of cleanup for Spark 3.
There was a problem hiding this comment.
You're welcome to fix this to === while here.
765be91 to
c837686
Compare
|
I agree with @vanzin's in general to be honest - I don't think it's encouraged to fix them. I am a-okay to fix it in Spark 3 but I would like to avoid to put a lot of efforts on this. |
|
Test build #102888 has finished for PR 23901 at commit
|
|
I agree with the general principle of not changing trivial stuff because of merge conflicts. My logic here is: Spark 3 is a good place as back ports from 3 to 2 are pretty rare; we want to be able to touch up the code at some point; generally OK with this from newer contributors. |
|
Merged to master |
What changes were proposed in this pull request?
Redundant
getwhen getting a value fromMapgiven a key.How was this patch tested?
N/A