Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/15239#discussion_r80540973
--- Diff: R/pkg/R/utils.R ---
@@ -334,6 +334,27 @@ varargsToEnv <- function(...) {
env
}
+# Utility function to capture the varargs into environment object but all
values are converted
+# into string.
+varargsToStrEnv <- function(...) {
+ pairs <- list(...)
+ env <- new.env()
+ for (name in names(pairs)) {
+ value <- pairs[[name]]
+ if (!(is.logical(value) || is.numeric(value) || is.character(value) ||
is.null(value))) {
+ stop("value[", value, "] in key[", name, "] is not convertable to
string.")
--- End diff --
this might not be ideal because the user is not calling this function
directly and `value[something]` might not mean anything to them (since they
have never set any value thing, furthermore, that might not be the relevant
syntax in R)
Any idea on a different way to report this?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]