Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/17178#discussion_r105859422
--- Diff: R/pkg/R/functions.R ---
@@ -2452,11 +2453,18 @@ setMethod("date_format", signature(y = "Column", x
= "character"),
#'}
#' @note from_json since 2.2.0
setMethod("from_json", signature(x = "Column", schema = "structType"),
- function(x, schema, ...) {
+ function(x, schema, asArray = FALSE, ...) {
+ if (asArray) {
+ jschema <- callJStatic("org.apache.spark.sql.api.r.SQLUtils",
+ "createArrayType",
--- End diff --
It seems we'd better use
`DataTypes.createArrayType`
per
https://github.com/apache/spark/blob/04ee8cf633e17b6bf95225a8dd77bf2e06980eb3/sql/catalyst/src/main/scala/org/apache/spark/sql/types/ArrayType.scala#L49-L56
Let me remove that new wrapper and use the original one.
---
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]