You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "mona (JIRA)" <ji...@apache.org> on 2018/11/05 17:40:00 UTC

[jira] [Commented] (SPARK-7967) cannot resolve 'count' given input columns when using DataFrame.withColumn

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

mona commented on SPARK-7967:
-----------------------------

Hi, did you solve this issue? I am having the same problem now 

> cannot resolve 'count' given input columns when using DataFrame.withColumn
> --------------------------------------------------------------------------
>
>                 Key: SPARK-7967
>                 URL: https://issues.apache.org/jira/browse/SPARK-7967
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.3.0
>         Environment: spark 1.3.0 standalone
>            Reporter: Will Chen
>            Priority: Major
>              Labels: dataFrame, sparksql
>
> Code:
> val userDF = app_user_register_log.filter($"add_time" > startDay).filter($"add_time" < endDay)
>       .select("id").as("userReg")
>       .join(activeDF.as("ad"), $"userReg.id" === $"ad.uid")
>       .select("ad.uid","ad.clientVerion","ad.loc","ad.auth_status"
>         ,"ad.channel","ad.bd_area","ad.mobile_area","ad.idcard_area")
>       .withColumn("count", $"count") // Exception came from this line



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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