-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-10807][SPARKR] Added as.data.frame as a synonym for collect #8908
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
Changes from all commits
461714d
e9e34b5
c65b682
cee871c
0851163
7a8e62a
de6d164
a346cc6
6c4dcbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1327,6 +1327,13 @@ test_that("SQL error message is returned from JVM", { | |
| expect_equal(grepl("Table Not Found: blah", retError), TRUE) | ||
| }) | ||
|
|
||
| test_that("Method as.data.frame as a synonym for collect()", { | ||
| irisDF <- createDataFrame(sqlContext, iris) | ||
| expect_equal(as.data.frame(irisDF), collect(irisDF)) | ||
| irisDF2 <- irisDF[irisDF$Species == "setosa", ] | ||
| expect_equal(as.data.frame(irisDF2), collect(irisDF2)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could we check if a R data.frame still work properly? for instance, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this is not necessary, since when I declared setGeneric("as.data.frame"), I didn't specify any definition. Therefore, my implementation of as.data.frame would not overwrite R's. I tested it myself, and as.data.frame() still works for objects other than DataFrame. |
||
| }) | ||
|
|
||
| unlink(parquetPath) | ||
| unlink(jsonPath) | ||
| unlink(jsonPathNa) | ||
| unlink(jsonPathNa) | ||
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.
is there a reason why this isn't on the same list of export for DataFrame above?