Skip to content

Conversation

@shivaram
Copy link
Contributor

The signature is summary(object, ...) as defined in
https://stat.ethz.ch/R-manual/R-devel/library/base/html/summary.html

@shivaram
Copy link
Contributor Author

cc @mengxr @yanboliang @sun-rui

@SparkQA
Copy link

SparkQA commented Nov 10, 2015

Test build #45465 has finished for PR 9582 at commit 6b40b0f.

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

@sun-rui
Copy link
Contributor

sun-rui commented Nov 10, 2015

LGTM.

I just want to discuss a BKM here for all cases of such kind. That is we want to add in SparkR a function which also an existing S3 geneirc function defined in R Base package. There are two ways for use to add such function in SparkR:

  1. Define an S4 generic function, which has compatible signature with the existing S3 generic function in Base package. Then use setMethod() to define the our own method for SparkR;
  2. No need to define an S4 generic function. Just define a new S3 method for the existing S3 generic function. For example, for this case, we could:
    summary.DataFrame <- ...

I am not sure which is better. I think we can have a discussion and find a preferred style. We can consistently use that style later.

@shivaram
Copy link
Contributor Author

Yeah thats a good point. I mostly prefer (1) because it makes our code base only contain S4 functions. However we do end up with a risk of bugs like this one. I do like the idea you used to add a test for rank and I think we should add tests that check the base R function works wherever we have a conflict.

@shivaram
Copy link
Contributor Author

Alright I'm merging this to catch 1.6. @sun-rui if we have more points to discuss, we can continue on the mailing list or JIRA.

asfgit pushed a commit that referenced this pull request Nov 10, 2015
The signature is summary(object, ...) as defined in
https://stat.ethz.ch/R-manual/R-devel/library/base/html/summary.html

Author: Shivaram Venkataraman <[email protected]>

Closes #9582 from shivaram/summary-fix.

(cherry picked from commit c4e19b3)
Signed-off-by: Shivaram Venkataraman <[email protected]>
@asfgit asfgit closed this in c4e19b3 Nov 10, 2015
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.

3 participants