You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/09/16 13:39:53 UTC
[GitHub] [spark] liangz1 opened a new pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
liangz1 opened a new pull request #34021:
URL: https://github.com/apache/spark/pull/34021
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes.
6. If possible, provide a concise example to reproduce the issue for a faster review.
7. If you want to add a new configuration, please read the guideline first for naming configurations in
'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
8. If you want to add or modify an error type or message, please read the guideline first in
'core/src/main/resources/error/README.md'.
-->
This PR adds the pyspark API `df.withMetadata(columnName, metadata)`. The scala API is added in this PR https://github.com/apache/spark/pull/33853.
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
To make it easy to use/modify the semantic annotation, we want to have a shorter API to update the metadata in a dataframe. Currently we have `df.withColumn("col1", col("col1").alias("col1", metadata=metadata))` to update the metadata without changing the column name, and this is too verbose. We want to have a syntax suger API `df.withMetadata("col1", metadata=metadata)` to achieve the same functionality.
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
A bit of background for the frequency of the update: We are working on inferring the semantic data types and use them in AutoML and store the semantic annotation in the metadata. So in many cases, we will suggest the user update the metadata to correct the wrong inference or add the annotation for weak inference.
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
If no, write 'No'.
-->
Yes.
A syntax suger API `df.withMetadata("col1", metadata=metadata)` to achieve the same functionality as`df.withColumn("col1", col("col1").alias("col1", metadata=metadata))`.
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
doctest.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] liangz1 commented on a change in pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
liangz1 commented on a change in pull request #34021:
URL: https://github.com/apache/spark/pull/34021#discussion_r710150489
##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2536,6 +2536,28 @@ def withColumnRenamed(self, existing, new):
"""
return DataFrame(self._jdf.withColumnRenamed(existing, new), self.sql_ctx)
+ def withMetadata(self, columnName, metadata):
+ """Returns a new :class:`DataFrame` by updating an existing column with metadata.
+
+ .. versionadded:: 3.3.0
+
+ Parameters
+ ----------
+ columnName : str
+ string, name of the existing column to update the metadata.
+ metadata : dict
+ dict, new metadata to be assigned to df.schema[columnName].metadata
+
+ Examples
+ --------
+ >>> df_meta = df.withMetadata('age', {'foo': 'bar'})
+ >>> df_meta.schema['age'].metadata
+ {'foo': 'bar'}
+ """
+ if not isinstance(metadata, dict):
Review comment:
https://github.com/apache/spark/blob/master/python/pyspark/sql/column.py#L712 The existing API that takes the metadata also specified that the metadata should be a dict in the docstring. However, I'm also fine with not checking the dict type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921040067
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143355/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921716972
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143409/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921860111
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47921/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921716656
**[Test build #143409 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143409/testReport)** for PR 34021 at commit [`e09cc2f`](https://github.com/apache/spark/commit/e09cc2fdfff6b423d797b66a40b582663b9b6456).
* This patch **fails PySpark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] WeichenXu123 commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
WeichenXu123 commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920924138
CC @HyukjinKwon
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921704171
**[Test build #143409 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143409/testReport)** for PR 34021 at commit [`e09cc2f`](https://github.com/apache/spark/commit/e09cc2fdfff6b423d797b66a40b582663b9b6456).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921056040
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47861/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921065947
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47861/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34021:
URL: https://github.com/apache/spark/pull/34021#discussion_r711837003
##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2536,6 +2536,28 @@ def withColumnRenamed(self, existing, new):
"""
return DataFrame(self._jdf.withColumnRenamed(existing, new), self.sql_ctx)
+ def withMetadata(self, columnName, metadata):
+ """Returns a new :class:`DataFrame` by updating an existing column with metadata.
+
+ .. versionadded:: 3.3.0
+
+ Parameters
+ ----------
+ columnName : str
+ string, name of the existing column to update the metadata.
+ metadata : dict
+ dict, new metadata to be assigned to df.schema[columnName].metadata
+
+ Examples
+ --------
+ >>> df_meta = df.withMetadata('age', {'foo': 'bar'})
+ >>> df_meta.schema['age'].metadata
+ {'foo': 'bar'}
+ """
+ if not isinstance(metadata, dict):
Review comment:
I think this is fine to check if it's an explicitly a dictionary. Following docstring sounds fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921742419
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47917/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] WeichenXu123 commented on a change in pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
WeichenXu123 commented on a change in pull request #34021:
URL: https://github.com/apache/spark/pull/34021#discussion_r710137451
##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2536,6 +2536,28 @@ def withColumnRenamed(self, existing, new):
"""
return DataFrame(self._jdf.withColumnRenamed(existing, new), self.sql_ctx)
+ def withMetadata(self, columnName, metadata):
+ """Returns a new :class:`DataFrame` by updating an existing column with metadata.
+
+ .. versionadded:: 3.3.0
+
+ Parameters
+ ----------
+ columnName : str
+ string, name of the existing column to update the metadata.
+ metadata : dict
+ dict, new metadata to be assigned to df.schema[columnName].metadata
+
+ Examples
+ --------
+ >>> df_meta = df.withMetadata('age', {'foo': 'bar'})
+ >>> df_meta.schema['age'].metadata
+ {'foo': 'bar'}
+ """
+ if not isinstance(metadata, dict):
Review comment:
why restrict the type to be dict ? we should allow any types which can be converted to JSON.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921040067
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143355/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921814280
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143414/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] WeichenXu123 commented on a change in pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
WeichenXu123 commented on a change in pull request #34021:
URL: https://github.com/apache/spark/pull/34021#discussion_r710134006
##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2536,6 +2536,28 @@ def withColumnRenamed(self, existing, new):
"""
return DataFrame(self._jdf.withColumnRenamed(existing, new), self.sql_ctx)
+ def withMetadata(self, columnName, metadata):
+ """Returns a new :class:`DataFrame` by updating an existing column with metadata.
+
+ .. versionadded:: 3.3.0
+
+ Parameters
+ ----------
+ columnName : str
+ string, name of the existing column to update the metadata.
+ metadata : dict
+ dict, new metadata to be assigned to df.schema[columnName].metadata
+
+ Examples
+ --------
+ >>> df_meta = df.withMetadata('age', {'foo': 'bar'})
+ >>> df_meta.schema['age'].metadata
+ {'foo': 'bar'}
+ """
+ if not isinstance(metadata, dict):
+ raise TypeError("metadata should be a dict")
+ return DataFrame(self._jdf.withMetadata(columnName, metadata), self.sql_ctx)
Review comment:
The metadata argument type is a dict , how does it pass to the java method `def withMetadata(columnName: String, metadata: Metadata)` and the metadata become a `Metadata` class type ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920970627
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920924465
**[Test build #143350 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143350/testReport)** for PR 34021 at commit [`75a44f1`](https://github.com/apache/spark/commit/75a44f1be89f9afa040b309c1b7e430d97f15141).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920924465
**[Test build #143350 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143350/testReport)** for PR 34021 at commit [`75a44f1`](https://github.com/apache/spark/commit/75a44f1be89f9afa040b309c1b7e430d97f15141).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921024534
**[Test build #143355 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143355/testReport)** for PR 34021 at commit [`2192b5f`](https://github.com/apache/spark/commit/2192b5fd5bff067366ba7e255bde1a3135a660a3).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920970580
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47858/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921814280
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143414/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921742470
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47917/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] WeichenXu123 commented on a change in pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
WeichenXu123 commented on a change in pull request #34021:
URL: https://github.com/apache/spark/pull/34021#discussion_r711587577
##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2536,6 +2536,28 @@ def withColumnRenamed(self, existing, new):
"""
return DataFrame(self._jdf.withColumnRenamed(existing, new), self.sql_ctx)
+ def withMetadata(self, columnName, metadata):
+ """Returns a new :class:`DataFrame` by updating an existing column with metadata.
+
+ .. versionadded:: 3.3.0
+
+ Parameters
+ ----------
+ columnName : str
+ string, name of the existing column to update the metadata.
+ metadata : dict
+ dict, new metadata to be assigned to df.schema[columnName].metadata
+
+ Examples
+ --------
+ >>> df_meta = df.withMetadata('age', {'foo': 'bar'})
+ >>> df_meta.schema['age'].metadata
+ {'foo': 'bar'}
+ """
+ if not isinstance(metadata, dict):
Review comment:
@HyukjinKwon
> https://github.com/apache/spark/blob/master/python/pyspark/sql/column.py#L712 The existing API that takes the metadata also specified that the metadata should be a dict in the docstring. However, I'm also fine with not checking the dict type.
But in code here https://github.com/apache/spark/blob/cabc36b54d7f6633d8b128e511e7049c475b919d/python/pyspark/sql/column.py#L747 it doesn't require metadata to be dict , so is it a doc error or code error there ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920939919
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143350/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] codecov-commenter commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-922454551
# [Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#34021](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cabc36b) into [master](https://codecov.io/gh/apache/spark/commit/2d7dc7c7ce6d524a232f37927ca179f162ad9971?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2d7dc7c) will **increase** coverage by `0.00%`.
> The diff coverage is `93.24%`.
> :exclamation: Current head cabc36b differs from pull request most recent head 28faa2e. Consider uploading reports for the commit 28faa2e to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/spark/pull/34021/graphs/tree.svg?width=650&height=150&src=pr&token=R9pHLWgWi8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #34021 +/- ##
=======================================
Coverage 90.19% 90.20%
=======================================
Files 288 288
Lines 60437 60527 +90
Branches 8879 8889 +10
=======================================
+ Hits 54514 54596 +82
- Misses 4595 4599 +4
- Partials 1328 1332 +4
```
| Flag | Coverage Δ | |
|---|---|---|
| unittests | `90.17% <93.24%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [python/pyspark/pandas/frame.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL2ZyYW1lLnB5) | `96.11% <50.00%> (+0.03%)` | :arrow_up: |
| [python/pyspark/pandas/tests/test\_series.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Rlc3RzL3Rlc3Rfc2VyaWVzLnB5) | `92.90% <89.28%> (-0.06%)` | :arrow_down: |
| [python/pyspark/pandas/series.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Nlcmllcy5weQ==) | `93.87% <91.66%> (-0.03%)` | :arrow_down: |
| [python/pyspark/pandas/typedef/typehints.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3R5cGVkZWYvdHlwZWhpbnRzLnB5) | `88.57% <93.90%> (+2.03%)` | :arrow_up: |
| [python/pyspark/pandas/base.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL2Jhc2UucHk=) | `94.08% <100.00%> (+0.04%)` | :arrow_up: |
| [...on/pyspark/pandas/tests/test\_ops\_on\_diff\_frames.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Rlc3RzL3Rlc3Rfb3BzX29uX2RpZmZfZnJhbWVzLnB5) | `93.09% <100.00%> (+0.04%)` | :arrow_up: |
| [python/pyspark/sql/functions.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL2Z1bmN0aW9ucy5weQ==) | `91.40% <100.00%> (+0.03%)` | :arrow_up: |
| [python/pyspark/sql/tests/test\_functions.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL3Rlc3RzL3Rlc3RfZnVuY3Rpb25zLnB5) | `98.92% <100.00%> (+0.02%)` | :arrow_up: |
| [python/pyspark/streaming/tests/test\_dstream.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3RyZWFtaW5nL3Rlc3RzL3Rlc3RfZHN0cmVhbS5weQ==) | `95.01% <0.00%> (-0.48%)` | :arrow_down: |
| [python/pyspark/sql/tests/test\_pandas\_udf\_scalar.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL3Rlc3RzL3Rlc3RfcGFuZGFzX3VkZl9zY2FsYXIucHk=) | `97.00% <0.00%> (-0.15%)` | :arrow_down: |
| ... and [1 more](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [adbea25...28faa2e](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921786316
**[Test build #143414 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143414/testReport)** for PR 34021 at commit [`28faa2e`](https://github.com/apache/spark/commit/28faa2e5070eb53abd24cb64af78d67222960e0a).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920967971
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47856/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] WeichenXu123 closed pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
WeichenXu123 closed pull request #34021:
URL: https://github.com/apache/spark/pull/34021
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921813729
**[Test build #143414 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143414/testReport)** for PR 34021 at commit [`28faa2e`](https://github.com/apache/spark/commit/28faa2e5070eb53abd24cb64af78d67222960e0a).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921344172
looks like we should fix the test:
```
**********************************************************************
File "/__w/spark/spark/python/pyspark/sql/dataframe.py", line 2553, in pyspark.sql.dataframe.DataFrame.withMetadata
Failed example:
df_meta = df.withMetadata('age', {'foo': 'bar'})
Exception raised:
Traceback (most recent call last):
File "/usr/lib/pypy3/lib-python/3/doctest.py", line 1339, in __run
compileflags, 1), test.globs)
File "<doctest pyspark.sql.dataframe.DataFrame.withMetadata[0]>", line 1, in <module>
df_meta = df.withMetadata('age', {'foo': 'bar'})
File "/__w/spark/spark/python/pyspark/sql/dataframe.py", line 2559, in withMetadata
sc = SparkContext._active_spark_context
NameError: name 'SparkContext' is not defined
**********************************************************************
File "/__w/spark/spark/python/pyspark/sql/dataframe.py", line 2554, in pyspark.sql.dataframe.DataFrame.withMetadata
Failed example:
df_meta.schema['age'].metadata
Exception raised:
Traceback (most recent call last):
File "/usr/lib/pypy3/lib-python/3/doctest.py", line 1339, in __run
compileflags, 1), test.globs)
File "<doctest pyspark.sql.dataframe.DataFrame.withMetadata[1]>", line 1, in <module>
df_meta.schema['age'].metadata
NameError: name 'df_meta' is not defined
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921742470
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47917/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] WeichenXu123 commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
WeichenXu123 commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-926258660
merge to master
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921024534
**[Test build #143355 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143355/testReport)** for PR 34021 at commit [`2192b5f`](https://github.com/apache/spark/commit/2192b5fd5bff067366ba7e255bde1a3135a660a3).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920939919
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143350/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921062719
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47861/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921860111
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47921/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920939431
**[Test build #143350 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143350/testReport)** for PR 34021 at commit [`75a44f1`](https://github.com/apache/spark/commit/75a44f1be89f9afa040b309c1b7e430d97f15141).
* This patch **fails PySpark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920963258
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47858/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920970627
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] liangz1 commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
liangz1 commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921854773
@HyukjinKwon The Kubernetes test failure looks irrelevant, is this a know issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921735912
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47917/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921065947
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47861/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-922166335
Yeah doesn't look related
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921716972
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143409/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] liangz1 commented on a change in pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
liangz1 commented on a change in pull request #34021:
URL: https://github.com/apache/spark/pull/34021#discussion_r710147710
##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2536,6 +2536,28 @@ def withColumnRenamed(self, existing, new):
"""
return DataFrame(self._jdf.withColumnRenamed(existing, new), self.sql_ctx)
+ def withMetadata(self, columnName, metadata):
+ """Returns a new :class:`DataFrame` by updating an existing column with metadata.
+
+ .. versionadded:: 3.3.0
+
+ Parameters
+ ----------
+ columnName : str
+ string, name of the existing column to update the metadata.
+ metadata : dict
+ dict, new metadata to be assigned to df.schema[columnName].metadata
+
+ Examples
+ --------
+ >>> df_meta = df.withMetadata('age', {'foo': 'bar'})
+ >>> df_meta.schema['age'].metadata
+ {'foo': 'bar'}
+ """
+ if not isinstance(metadata, dict):
+ raise TypeError("metadata should be a dict")
+ return DataFrame(self._jdf.withMetadata(columnName, metadata), self.sql_ctx)
Review comment:
Nice catch! I updated the conversion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] codecov-commenter removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
codecov-commenter removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-922454551
# [Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#34021](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cabc36b) into [master](https://codecov.io/gh/apache/spark/commit/2d7dc7c7ce6d524a232f37927ca179f162ad9971?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2d7dc7c) will **increase** coverage by `0.00%`.
> The diff coverage is `93.24%`.
> :exclamation: Current head cabc36b differs from pull request most recent head 28faa2e. Consider uploading reports for the commit 28faa2e to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/spark/pull/34021/graphs/tree.svg?width=650&height=150&src=pr&token=R9pHLWgWi8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #34021 +/- ##
=======================================
Coverage 90.19% 90.20%
=======================================
Files 288 288
Lines 60437 60527 +90
Branches 8879 8889 +10
=======================================
+ Hits 54514 54596 +82
- Misses 4595 4599 +4
- Partials 1328 1332 +4
```
| Flag | Coverage Δ | |
|---|---|---|
| unittests | `90.17% <93.24%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [python/pyspark/pandas/frame.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL2ZyYW1lLnB5) | `96.11% <50.00%> (+0.03%)` | :arrow_up: |
| [python/pyspark/pandas/tests/test\_series.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Rlc3RzL3Rlc3Rfc2VyaWVzLnB5) | `92.90% <89.28%> (-0.06%)` | :arrow_down: |
| [python/pyspark/pandas/series.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Nlcmllcy5weQ==) | `93.87% <91.66%> (-0.03%)` | :arrow_down: |
| [python/pyspark/pandas/typedef/typehints.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3R5cGVkZWYvdHlwZWhpbnRzLnB5) | `88.57% <93.90%> (+2.03%)` | :arrow_up: |
| [python/pyspark/pandas/base.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL2Jhc2UucHk=) | `94.08% <100.00%> (+0.04%)` | :arrow_up: |
| [...on/pyspark/pandas/tests/test\_ops\_on\_diff\_frames.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Rlc3RzL3Rlc3Rfb3BzX29uX2RpZmZfZnJhbWVzLnB5) | `93.09% <100.00%> (+0.04%)` | :arrow_up: |
| [python/pyspark/sql/functions.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL2Z1bmN0aW9ucy5weQ==) | `91.40% <100.00%> (+0.03%)` | :arrow_up: |
| [python/pyspark/sql/tests/test\_functions.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL3Rlc3RzL3Rlc3RfZnVuY3Rpb25zLnB5) | `98.92% <100.00%> (+0.02%)` | :arrow_up: |
| [python/pyspark/streaming/tests/test\_dstream.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3RyZWFtaW5nL3Rlc3RzL3Rlc3RfZHN0cmVhbS5weQ==) | `95.01% <0.00%> (-0.48%)` | :arrow_down: |
| [python/pyspark/sql/tests/test\_pandas\_udf\_scalar.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL3Rlc3RzL3Rlc3RfcGFuZGFzX3VkZl9zY2FsYXIucHk=) | `97.00% <0.00%> (-0.15%)` | :arrow_down: |
| ... and [1 more](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [adbea25...28faa2e](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921838709
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47921/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-920960424
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47856/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921704171
**[Test build #143409 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143409/testReport)** for PR 34021 at commit [`e09cc2f`](https://github.com/apache/spark/commit/e09cc2fdfff6b423d797b66a40b582663b9b6456).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921039610
**[Test build #143355 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143355/testReport)** for PR 34021 at commit [`2192b5f`](https://github.com/apache/spark/commit/2192b5fd5bff067366ba7e255bde1a3135a660a3).
* This patch **fails PySpark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] codecov-commenter edited a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-922454551
# [Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#34021](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cabc36b) into [master](https://codecov.io/gh/apache/spark/commit/2d7dc7c7ce6d524a232f37927ca179f162ad9971?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2d7dc7c) will **increase** coverage by `0.00%`.
> The diff coverage is `93.24%`.
> :exclamation: Current head cabc36b differs from pull request most recent head 28faa2e. Consider uploading reports for the commit 28faa2e to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/spark/pull/34021/graphs/tree.svg?width=650&height=150&src=pr&token=R9pHLWgWi8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #34021 +/- ##
=======================================
Coverage 90.19% 90.20%
=======================================
Files 288 288
Lines 60437 60527 +90
Branches 8879 8889 +10
=======================================
+ Hits 54514 54596 +82
- Misses 4595 4599 +4
- Partials 1328 1332 +4
```
| Flag | Coverage Δ | |
|---|---|---|
| unittests | `90.17% <93.24%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [python/pyspark/pandas/frame.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL2ZyYW1lLnB5) | `96.11% <50.00%> (+0.03%)` | :arrow_up: |
| [python/pyspark/pandas/tests/test\_series.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Rlc3RzL3Rlc3Rfc2VyaWVzLnB5) | `92.90% <89.28%> (-0.06%)` | :arrow_down: |
| [python/pyspark/pandas/series.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Nlcmllcy5weQ==) | `93.87% <91.66%> (-0.03%)` | :arrow_down: |
| [python/pyspark/pandas/typedef/typehints.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3R5cGVkZWYvdHlwZWhpbnRzLnB5) | `88.57% <93.90%> (+2.03%)` | :arrow_up: |
| [python/pyspark/pandas/base.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL2Jhc2UucHk=) | `94.08% <100.00%> (+0.04%)` | :arrow_up: |
| [...on/pyspark/pandas/tests/test\_ops\_on\_diff\_frames.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3BhcmsvcGFuZGFzL3Rlc3RzL3Rlc3Rfb3BzX29uX2RpZmZfZnJhbWVzLnB5) | `93.09% <100.00%> (+0.04%)` | :arrow_up: |
| [python/pyspark/sql/functions.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL2Z1bmN0aW9ucy5weQ==) | `91.40% <100.00%> (+0.03%)` | :arrow_up: |
| [python/pyspark/sql/tests/test\_functions.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL3Rlc3RzL3Rlc3RfZnVuY3Rpb25zLnB5) | `98.92% <100.00%> (+0.02%)` | :arrow_up: |
| [python/pyspark/streaming/tests/test\_dstream.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3RyZWFtaW5nL3Rlc3RzL3Rlc3RfZHN0cmVhbS5weQ==) | `95.01% <0.00%> (-0.48%)` | :arrow_down: |
| [python/pyspark/sql/tests/test\_pandas\_udf\_scalar.py](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHl0aG9uL3B5c3Bhcmsvc3FsL3Rlc3RzL3Rlc3RfcGFuZGFzX3VkZl9zY2FsYXIucHk=) | `97.00% <0.00%> (-0.15%)` | :arrow_down: |
| ... and [1 more](https://codecov.io/gh/apache/spark/pull/34021/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [adbea25...28faa2e](https://codecov.io/gh/apache/spark/pull/34021?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] liangz1 edited a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
liangz1 edited a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921854773
@HyukjinKwon The Kubernetes test failure looks irrelevant, is this a known issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921786316
**[Test build #143414 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143414/testReport)** for PR 34021 at commit [`28faa2e`](https://github.com/apache/spark/commit/28faa2e5070eb53abd24cb64af78d67222960e0a).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #34021: [SPARK-36642][SQL] Add df.withMetadata pyspark API
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921846207
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47921/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org