[
https://issues.apache.org/jira/browse/SPARK-12225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15048059#comment-15048059
]
Xiao Li edited comment on SPARK-12225 at 12/9/15 5:21 AM:
----------------------------------------------------------
This is related to the changes on the external APIs. Need to collect more ideas
before starting it.
Do you like the following interfaces? [~marmbrus] [~rxin] [~sunrui]
{code}
def withColumn(columns: Map[String, Column]): DataFrame
def withColumnRenamed(columns: Map[String, String]): DataFrame
{code}
Then, how about the multi-column support of withColumn if having metadata?
{code}
def withColumn(colName: String, col: Column, metadata: Metadata): DataFrame
{code}
was (Author: smilegator):
This is related to the changes on the external APIs. Need to collect more ideas
before starting it.
Do you like the following interfaces? [~marmbrus] [~rxin] [~sunrui]
{code}
def withColumn(columns: Map[String, Column]): DataFrame
def withColumnRenamed(columns: Map[String, String]): DataFrame
{code}
Then, how about the multi-column support of withColumn if having metadata?
{code}
def withColumn(colName: String, col: Column, metadata: Metadata):
{code}
> Support adding or replacing multiple columns at once in DataFrame API
> ---------------------------------------------------------------------
>
> Key: SPARK-12225
> URL: https://issues.apache.org/jira/browse/SPARK-12225
> Project: Spark
> Issue Type: New Feature
> Components: SQL
> Affects Versions: 1.5.2
> Reporter: Sun Rui
>
> Currently, withColumn() method of DataFrame supports adding or replacing only
> single column. It would be convenient to support adding or replacing multiple
> columns at once.
> Also withColumnRenamed() supports renaming only single column.It would also
> be convenient to support renaming multiple columns at once.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]