[ 
https://issues.apache.org/jira/browse/SPARK-9325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14743759#comment-14743759
 ] 

Shivaram Venkataraman commented on SPARK-9325:
----------------------------------------------

Thanks [~felixcheung] for investigating into this. I see the problem that we 
need a handle to the DataFrame in order to be able to collect a column. I can 
think of couple of ways to solve this: 
One is to save an optional handle to the DataFrame in the R side and then if 
the handle is available we will support collect. i.e. if the column was created 
using some other method (say col("name") then we won't support collect). 

The other is to add a method on the Scala side which can return the data frame 
handle or do the selection for us if the column is resolved -- [~davies] or 
[~rxin] might be able to comment more on this.

> Support `collect` on DataFrame columns
> --------------------------------------
>
>                 Key: SPARK-9325
>                 URL: https://issues.apache.org/jira/browse/SPARK-9325
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SparkR
>            Reporter: Shivaram Venkataraman
>
> This is to support code of the form 
> ```
> ages <- collect(df$Age)
> ```
> Right now `df$Age` returns a Column, which has no functions supported.
> Similarly we might consider supporting `head(df$Age)` etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to