Skip to content

Conversation

@mgaido91
Copy link
Contributor

@mgaido91 mgaido91 commented Aug 27, 2018

What changes were proposed in this pull request?

Most of HigherOrderFunctions have the same nullable definition, 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

@mgaido91
Copy link
Contributor Author

cc @ueshin @mn-mikke

Copy link
Contributor

@hvanhovell hvanhovell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kiszk
Copy link
Member

kiszk commented Aug 27, 2018

LGTM

@ueshin
Copy link
Member

ueshin commented Aug 27, 2018

LGTM.

*/
trait SimpleHigherOrderFunction extends HigherOrderFunction {

override def nullable: Boolean = argument.nullable
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Member

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

@SparkQA
Copy link

SparkQA commented Aug 27, 2018

Test build #95288 has finished for PR 22243 at commit 7bf7b29.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

@mn-mikke mn-mikke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SparkQA
Copy link

SparkQA commented Aug 28, 2018

Test build #95342 has finished for PR 22243 at commit 393379c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgaido91
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Aug 28, 2018

Test build #95345 has finished for PR 22243 at commit 393379c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgaido91
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Aug 28, 2018

Test build #95350 has finished for PR 22243 at commit 393379c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgaido91
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Aug 28, 2018

Test build #95362 has finished for PR 22243 at commit 393379c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

Merged to master.

@asfgit asfgit closed this in 32c8a3d Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants