Skip to content
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

[SPARK-13905][SPARKR] Change signature of as.data.frame() to be consistent with the R base package. #11811

Closed
wants to merge 1 commit into from

Conversation

sun-rui
Copy link
Contributor

@sun-rui sun-rui commented Mar 18, 2016

What changes were proposed in this pull request?

Change the signature of as.data.frame() to be consistent with that in the R base package to meet R user's convention.

How was this patch tested?

dev/lint-r
SparkR unit tests

@SparkQA
Copy link

SparkQA commented Mar 18, 2016

Test build #53497 has finished for PR 11811 at commit 53cc1d7.

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

@felixcheung
Copy link
Member

if it wasn't a conflict previously, why change it now that it could cause a conflict?

@sun-rui
Copy link
Contributor Author

sun-rui commented Mar 21, 2016

R's signature is

as.data.frame(x, row.names = NULL, optional = FALSE, ...)

But current implementation does not support the parameters like row.names, optional:

            if (length(list(...)) > 0) {
              stop(paste("Unused argument(s): ", paste(list(...), collapse = ", ")))
            }

This PR enhance the implementation so that the additional parameters can be honored. This should match R users's usage more.

Also in this PR the as.data.frame versions in the R base package can also be expose and used.

@felixcheung
Copy link
Member

make sense - I'd suggest amending JIRA/PR title to reflect this nice additional functionality?

@felixcheung
Copy link
Member

looks good!

@shivaram
Copy link
Contributor

LGTM. @sun-rui Sorry for the delay in looking at this. Can you bring this PR up to date with master ?

@sun-rui
Copy link
Contributor Author

sun-rui commented Apr 20, 2016

@shivaram, rebased to master.

@SparkQA
Copy link

SparkQA commented Apr 20, 2016

Test build #56314 has finished for PR 11811 at commit c6e881d.

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

@shivaram
Copy link
Contributor

LGTM. Merging this.

@asfgit asfgit closed this in 8eedf0b Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants