Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18498#discussion_r126290322
  
    --- Diff: R/pkg/R/schema.R ---
    @@ -68,6 +68,28 @@ structType.structField <- function(x, ...) {
       structType(stObj)
     }
     
    +#' Create \code{structType} for a given DDL-formatted string.
    +#'
    +#' Create \code{structType} for a given DDL-formatted string, which is a 
comma separated list
    +#' of field definitions, e.g., a INT, b STRING.
    +#'
    +#' @param x The data schema defined in a DDL-formatted string.
    +#' @examples
    +#'\dontrun{
    +#' structTypeFromDDL("a INT, b STRING")
    +#' }
    +#' @note structTypeFromDDL since 2.3.0
    +structTypeFromDDL <- function(x) {
    +  if (!is.character(x)) {
    +    stop("schema name must be a DDL-formatted string.")
    --- End diff --
    
    minor nit for clarity: `schema must be a DDL-formatted string.`
    btw, is it possible to support JSON format string in R too?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to