spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NarineK <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-12922][SparkR][WIP] Implement gapply() ...
Date Mon, 16 May 2016 04:01:31 GMT
Github user NarineK commented on the pull request:

    https://github.com/apache/spark/pull/12836#issuecomment-219344135
  
    Hi @sun-rui ,
    Thank you for the comments.
    
    1. This point is easy to do. I'll do the change.
    
    2. With `key columns` I assume that you refer to the grouping column names. Something
like `Species` in the iris dataset ?
    Actually, in my implementation I do not use the keys on the R side, I use it as a boundary,
I could also write one bit, like dataOut.writeInt(1) just to mark the boundary. But if according
to your 3rd point we want to pass keys to R function like: (Keys, ldf), then we need more
than just a boundary.
    3. Well it might make sense, but currently the user can still access  the grouping columns,
like I did in the examples: 
    ```
     df1 <- gapply(
     df, list(df$"Species")
       function(x) {
         data.frame(**x$Species[1]**, mean(x$Sepal_Width), stringsAsFactors = FALSE)
       },
       schema)
    ```
    
    `**x$Species[1]**` accesses the key . 
    



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

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


Mime
View raw message