-
Notifications
You must be signed in to change notification settings - Fork 29k
[MINOR] Avoid code duplication for nullable in Higher Order function #22243
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
hvanhovell
left a comment
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.
LGTM
|
LGTM |
|
LGTM. |
| */ | ||
| trait SimpleHigherOrderFunction extends HigherOrderFunction { | ||
|
|
||
| override def nullable: Boolean = argument.nullable |
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 we moved the definition of nullable straight to HigherOrderFunction as arguments.exists(_.nullable), we could also avoid the duplicities in ZipWith and MapZipWith. WDYT?
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.
this works too IMO, if others agree I'll update with this suggestion, thanks.
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.
Yea, let's go ahead then if the change is small, straightforward and more deduplciation
|
Test build #95288 has finished for PR 22243 at commit
|
mn-mikke
left a comment
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.
LGTM
|
Test build #95342 has finished for PR 22243 at commit
|
|
retest this please |
|
Test build #95345 has finished for PR 22243 at commit
|
|
retest this please |
|
Test build #95350 has finished for PR 22243 at commit
|
|
retest this please |
|
Test build #95362 has finished for PR 22243 at commit
|
|
Merged to master. |
What changes were proposed in this pull request?
Most of
HigherOrderFunctions have the samenullabledefinition, ie. they are nullable when one of their arguments is nullable. The PR refactors it in order to avoid code duplication.How was this patch tested?
NA