-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-12629] [SparkR] Fixes for DataFrame saveAsTable method #10580
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
62872f1
d55cc13
8948f98
86c1432
7de1894
faa4971
fdd38c5
8abf4c1
3c24314
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 |
|---|---|---|
|
|
@@ -539,7 +539,7 @@ setGeneric("sampleBy", function(x, col, fractions, seed) { standardGeneric("samp | |
|
|
||
| #' @rdname saveAsTable | ||
| #' @export | ||
| setGeneric("saveAsTable", function(df, tableName, source, mode, ...) { | ||
| setGeneric("saveAsTable", function(df, tableName, source = NULL, mode = "error", ...) { | ||
|
Contributor
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.
Contributor
Author
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. yes, that works! thanks for the suggestion! |
||
| standardGeneric("saveAsTable") | ||
| }) | ||
|
|
||
|
|
@@ -552,7 +552,15 @@ setGeneric("transform", function(`_data`, ...) {standardGeneric("transform") }) | |
|
|
||
| #' @rdname write.df | ||
| #' @export | ||
| setGeneric("saveDF", function(df, path, ...) { standardGeneric("saveDF") }) | ||
| setGeneric("write.df", function(df, path, source = NULL, mode = "error", ...) { | ||
| standardGeneric("write.df") | ||
| }) | ||
|
|
||
| #' @rdname write.df | ||
| #' @export | ||
| setGeneric("saveDF", function(df, path, source = NULL, mode = "error", ...) { | ||
| standardGeneric("saveDF") | ||
| }) | ||
|
|
||
| #' @rdname write.json | ||
| #' @export | ||
|
|
||
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 think the same problem exists in write.df()? Could you extract the following logic into a util function, and update write.df() also to use it?
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.
See #9192 :)
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.
@felixcheung , @sun-rui , @shivaram : that's a good idea, I can use "getSqlContext()" method proposed in https://github.com/apache/spark/pull/9192/files#diff-b11442485f6b77bf47b58b4747321638R36
I guess I need to wait that pull request to go in and then I can merge it with mine .
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.
@felixcheung, it seems that you have it for saveAsTable too. After merge I can add my test cases ...