-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-9929][SQL] support metadata in withColumn #8159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #40732 has finished for PR 8159 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: metadata
|
The ML changes look good. (Thanks for adding this.) The new method looks fine, unless you want to reduce code duplication. |
|
Does the new function needs to be public? Can it be private[spark] ? |
|
ML does not need it to be public. |
|
OK @cloud-fan let's make this private[spark] for now. |
|
Test build #40841 has finished for PR 8159 at commit
|
|
The API change LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make Column.as(alias: String, metadata: Metadata) also private? As it expose the Metadata too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think we can change that since it's been public since 1.3.
|
Test build #40843 has finished for PR 8159 at commit
|
|
LGTM |
|
Merging this in master (not branch-1.5). |
in MLlib sometimes we need to set metadata for the new column, thus we will alias the new column with metadata before call `withColumn` and in `withColumn` we alias this clolumn again. Here I overloaded `withColumn` to allow user set metadata, just like what we did for `Column.as`. Author: Wenchen Fan <cloud0fan@outlook.com> Closes apache#8159 from cloud-fan/withColumn.
in MLlib sometimes we need to set metadata for the new column, thus we will alias the new column with metadata before call
withColumnand inwithColumnwe alias this clolumn again. Here I overloadedwithColumnto allow user set metadata, just like what we did forColumn.as.