-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARKR][SPARK-17442] Additional arguments in write.df are not passed to data source #15007
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
Conversation
|
Test build #65065 has finished for PR 15007 at commit
|
R/pkg/R/DataFrame.R
Outdated
| write <- callJMethod(write, "format", source) | ||
| write <- callJMethod(write, "mode", jmode) | ||
| write <- callJMethod(write, "save", path) | ||
| write <- callJMethod(write, "save", options) |
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.
I am not sure I see a save method which takes in options. What if we just call write <- callJMethod(write, "options", options) in the line before write <- callJMethod(write, "save", path) ?
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.
oops, sorry I broke it.
right, I think the right approach is
write <- callJMethod(write, "options", options)
write <- callJMethod(write, "save", path)
save should be the last call.
|
Test build #65067 has finished for PR 15007 at commit
|
| csvPath2 <- tempfile(pattern = "csvtest2", fileext = ".csv") | ||
| write.df(df2, path = csvPath2, "csv", header = "true") | ||
| df3 <- read.df(csvPath2, "csv", header = "true") | ||
| exect_equal(nrow(df3), nrow(df2)) |
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.
typo expect_equal
|
sorry for the trouble, I opened #15010 with the fix |
|
Test build #65078 has finished for PR 15007 at commit
|
What changes were proposed in this pull request?
additional options were not passed down in
write.df. This patch fixes thatHow was this patch tested?
Adds unit test for passing
header = "true"for CSV data source in R unit tests