spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Cheung (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-18823) Assignation by column name variable not available or bug?
Date Wed, 14 Dec 2016 06:25:58 GMT

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

Felix Cheung commented on SPARK-18823:
--------------------------------------

We will address both of your suggestions.

As for x$y <- t$q, assuming you mean x and t being 2 different Spark DataFrame, this would
depend on having the ability to collect a specific column, and ideally, without transitioning
JVM->R->JVM. 

> Assignation by column name variable not available or bug?
> ---------------------------------------------------------
>
>                 Key: SPARK-18823
>                 URL: https://issues.apache.org/jira/browse/SPARK-18823
>             Project: Spark
>          Issue Type: Question
>          Components: SparkR
>    Affects Versions: 2.0.2
>         Environment: RStudio Server in EC2 Instances (EMR Service of AWS) Emr 4. Or databricks
(community.cloud.databricks.com) .
>            Reporter: Vicente Masip
>             Fix For: 2.0.2
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I really don't know if this is a bug or can be done with some function:
> Sometimes is very important to assign something to a column which name has to be access
trough a variable. Normally, I have always used it with doble brackets likes this out of SparkR
problems:
> # df could be faithful normal data frame or data table.
> # accesing by variable name:
> myname = "waiting"
> df[[myname]] <- c(1:nrow(df))
> # or even column number
> df[[2]] <- df$eruptions
> The error is not caused by the right side of the "<-" operator of assignment. The
problem is that I can't assign to a column name using a variable or column number as I do
in this examples out of spark. Doesn't matter if I am modifying or creating column. Same problem.
> I have also tried to use this with no results:
> val df2 = withColumn(df,"tmp", df$eruptions)



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

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


Mime
View raw message