Skip to content

Conversation

@yanboliang
Copy link
Contributor

1, Add isNaN to Column for SparkR. Column should has three related variable functions: isNaN, isNull, isNotNull.
2, Replace DataFrame.isNaN with DataFrame.isnan at SparkR side. Because DataFrame.isNaN has been deprecated and will be removed at Spark 2.0.
3, Add isnull to DataFrame for SparkR. DataFrame should has two related functions: isnan, isnull.

cc @shivaram @sun-rui @felixcheung

@SparkQA
Copy link

SparkQA commented Nov 30, 2015

Test build #46874 has finished for PR 10037 at commit 6805952.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

please add test cases for "isNaN", "isNull", "isNotNul" for Column

@sun-rui
Copy link
Contributor

sun-rui commented Nov 30, 2015

LGTM except that it's good to add additional test cases.

Copy link
Member

Choose a reason for hiding this comment

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

should this be called (or have an alias) is.nan?
https://stat.ethz.ch/R-manual/R-devel/library/base/html/is.finite.html

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, it makes sense to add an alias as is.nan

@SparkQA
Copy link

SparkQA commented Dec 2, 2015

Test build #47058 has finished for PR 10037 at commit 00ce43a.

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

@sun-rui
Copy link
Contributor

sun-rui commented Dec 2, 2015

@yanboliang, I am ok that we leave alias of is.na to SPARK-12071. But it would be better you can add alias is.nan.

@SparkQA
Copy link

SparkQA commented Dec 2, 2015

Test build #47065 has finished for PR 10037 at commit 041c9c6.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

it seems that "is.nan" in base package is masked? There is an implicit generic function for a primitive function. I think no need to define it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I will update it.

Copy link
Member

Choose a reason for hiding this comment

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

please also add a test for base::is.nan if we are masking it. See https://github.com/yanboliang/spark/blob/spark-12044/R/pkg/inst/tests/test_sparkSQL.R#L931

@SparkQA
Copy link

SparkQA commented Dec 3, 2015

Test build #47123 has finished for PR 10037 at commit 95fdd2c.

  • This patch fails R style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@sun-rui
Copy link
Contributor

sun-rui commented Dec 3, 2015

LGTM

@SparkQA
Copy link

SparkQA commented Dec 3, 2015

Test build #47127 has finished for PR 10037 at commit 3ee7d5c.

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

@yanboliang yanboliang changed the title [SPARK-12044] [SparkR] Fix usage of isnan, isnull, isNaN, isNull, isNotNull [SPARK-12044] [SparkR] Fix usage of isnan, isNaN, isNull, isNotNull Dec 4, 2015
@yanboliang yanboliang changed the title [SPARK-12044] [SparkR] Fix usage of isnan, isNaN, isNull, isNotNull [SPARK-12044] [SparkR] Fix usage of isnan, isNaN Dec 4, 2015
@shivaram
Copy link
Contributor

shivaram commented Dec 6, 2015

Thanks @sun-rui @felixcheung for the clarifications and @yanboliang for the change. LGTM. Merging this to master, branch-1.6

asfgit pushed a commit that referenced this pull request Dec 6, 2015
1, Add ```isNaN``` to ```Column``` for SparkR. ```Column``` should has three related variable functions: ```isNaN, isNull, isNotNull```.
2, Replace ```DataFrame.isNaN``` with ```DataFrame.isnan``` at SparkR side. Because ```DataFrame.isNaN``` has been deprecated and will be removed at Spark 2.0.
<del>3, Add ```isnull``` to ```DataFrame``` for SparkR. ```DataFrame``` should has two related functions: ```isnan, isnull```.<del>

cc shivaram sun-rui felixcheung

Author: Yanbo Liang <[email protected]>

Closes #10037 from yanboliang/spark-12044.

(cherry picked from commit b6e8e63)
Signed-off-by: Shivaram Venkataraman <[email protected]>
@asfgit asfgit closed this in b6e8e63 Dec 6, 2015
@yanboliang
Copy link
Contributor Author

Thanks for your help @sun-rui @felixcheung @shivaram .

@yanboliang yanboliang deleted the spark-12044 branch December 7, 2015 01:29
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.

5 participants