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

[jira] [Resolved] (SPARK-26050) Implment withColumnExpr method on DataFrame

     [ https://issues.apache.org/jira/browse/SPARK-26050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-26050.
----------------------------------
    Resolution: Won't Fix

> Implment withColumnExpr method on DataFrame
> -------------------------------------------
>
>                 Key: SPARK-26050
>                 URL: https://issues.apache.org/jira/browse/SPARK-26050
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Mathew
>            Priority: Major
>
> Currently we provide some syntactic sugar in the form of df.selectExpr(), which effectively executes as df.select(expr(), expr(), ...)
> I propose we implement a df.withColumnExpr(), which behaves similarly to df.withColumn(), except without the colName parameter, instead taking column names from the expressions themselves.
> This would stop the unfriendly paradigm of chained .withColumn().withColumn().withColumn() expressions, as we could allow passing as many column expressions as you want.
> Similar to df.selectExpr(), we should support all of: 'column names', 'column expressions', 'column string expressions' as inputs.
> Comments are welcome.



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