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

    https://github.com/apache/spark/pull/9099#discussion_r44860198
  
    --- Diff: R/pkg/R/SQLContext.R ---
    @@ -90,19 +96,31 @@ createDataFrame <- function(sqlContext, data, schema = 
NULL, samplingRatio = 1.0
           if (is.null(schema)) {
             schema <- names(data)
           }
    -      n <- nrow(data)
    -      m <- ncol(data)
    -      # get rid of factor type
    -      dropFactor <- function(x) {
    +
    +      # types that should be wrapped before
    +      # mapply to avoid flattening
    +      requires_wrapping <- c("list")
    +
    +      # get rid of factor type and adjust for lists
    +      cleanCols <- function(x) {
             if (is.factor(x)) {
               as.character(x)
    +        } else if(class(x) %in% requires_wrapping) {
    --- End diff --
    
    @sun-rui Yes, the only reason to add `requires_wrapping` was to mimic 
behavior described in SPARK-11283 and not introduce unexpected changes in 
behavior. I understand I can safely drop this and add tests assuming that  
SPARK-11283 is indeed a bug :) If so I'll try to do it before Monday. 


---
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]

Reply via email to