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

Shivaram Venkataraman commented on SPARK-14325:
-----------------------------------------------

I think the problem might be related to `x` being an argument of type 
GroupedData to agg ? Does your code work if you replace `x = "sum"` with some 
other name ?
{code}
setMethod("agg",
          signature(x = "GroupedData"),
          function(x, ...) {
{code}

> some strange name conflicts in `group_by`
> -----------------------------------------
>
>                 Key: SPARK-14325
>                 URL: https://issues.apache.org/jira/browse/SPARK-14325
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>    Affects Versions: 1.6.0, 1.6.1
>         Environment: sparkR 1.6.0
>            Reporter: Dmitriy Selivanov
>
> group_by strange behaviour when try to aggregate by column with name "x".
> consider following example
> {code}
>     df
>     # DataFrame[userId:bigint, type:string, j:int, x:int]
>     df %>%group_by(df$userId, df$type, df$j) %>% agg(x = "sum")
>     #Error in (function (classes, fdef, mtable)  : 
>     #  unable to find an inherited method for function ‘agg’ for signature 
> ‘"character"’
> {code}
> after renaming x -> x2 works just file.



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