Github user sun-rui commented on the pull request:

    https://github.com/apache/spark/pull/8276#issuecomment-132571243
  
    @shivaram, I tried to support ArrayType. By adding code like:
          // Convert Seq[Any] to Array[Any]
          val value =
            if (obj.isInstanceOf[Seq[Any]]) {
              obj.asInstanceOf[Seq[Any]].toArray
            } else {
              obj
            }
    I can collect successfully ArrayType on R side.
    However, this confilicts with listToSeq() R util functions, because 
listToSeq() expects to get a jobj to the seq, while SerDe passes back the 
content of seq instead of jobj. So I think we need some mechanism telling the 
RBackend what we want a jobj or its content?
    
    Adding support for ArrayType would make this PR big and hard to review. I 
would be better you could look at this PR and merge it. 
    
    I know you have a concern as we don't have test cases for this PR. Maybe I 
can add test cases for SerDe:
      Add a function called Echo() in RBackend, it is for test-only purpose. It 
can pass args back to R side. args could be array, nested array, etc...
    What do you think?


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