You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Mathew (JIRA)" <ji...@apache.org> on 2018/11/14 00:46:00 UTC
[jira] [Created] (SPARK-26050) Implment withColumnExpr method on
DataFrame
Mathew created SPARK-26050:
------------------------------
Summary: 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
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