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 2020/09/09 23:12:34 UTC

[GitHub] [spark] Kimahriman opened a new pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Kimahriman opened a new pull request #29699:
URL: https://github.com/apache/spark/pull/29699


   <!--
   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'.
   -->
   
   ### 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.
   -->
   This PR adds a `withField` method on the pyspark Column class to call the Scala API method added in https://github.com/apache/spark/pull/27066. 
   
   ### 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.
   -->
   To update the Python API to match a new feature in the Scala API.
   
   ### 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'.
   -->
   No.
   
   ### 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.
   -->
   New unit test
   


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692096629






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487883751



##########
File path: python/pyspark/sql/tests/test_column.py
##########
@@ -139,6 +139,33 @@ def test_bitwise_operations(self):
         result = df.select(functions.bitwiseNOT(df.b)).collect()[0].asDict()
         self.assertEqual(~75, result['~b'])
 
+    def test_with_field(self):

Review comment:
       Oh I meant, the test cases you added in doctests look good enough as positive cases. So, we can remove this test you added at `test_column.py`.
   
   Instead, I think we can have some tests that checks exception types and messages here at `test_column.py`.




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691937281


   **[Test build #128635 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128635/testReport)** for PR 29699 at commit [`a2ed22e`](https://github.com/apache/spark/commit/a2ed22ef8e0c37765a4105b7cd10ad34e1a14651).
    * 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.

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487872555



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):

Review comment:
       Ohhh, okay no need to add in this PR. Let's add it in a separate PR.




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

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] Kimahriman commented on a change in pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487979709



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.
+
+        >>> from pyspark.sql import Row, functions

Review comment:
       Done




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692119220






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

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] Kimahriman commented on a change in pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487868842



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):

Review comment:
       This is part of the Column class not DataFrame class, and I don't see a section for Column yet. Should I add one?




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

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] Kimahriman commented on a change in pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487991395



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.
+
+        >>> from pyspark.sql import Row, functions

Review comment:
       Oh woops I did that for the test not for the docstring, sorry




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692130886






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692096629






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

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 closed pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #29699:
URL: https://github.com/apache/spark/pull/29699


   


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487748357



##########
File path: python/pyspark/sql/tests/test_column.py
##########
@@ -139,6 +139,33 @@ def test_bitwise_operations(self):
         result = df.select(functions.bitwiseNOT(df.b)).collect()[0].asDict()
         self.assertEqual(~75, result['~b'])
 
+    def test_with_field(self):

Review comment:
       I think doctests are good enough for positive cases. Let's just add negative cases by catching exceptions here.




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691913021


   **[Test build #128635 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128635/testReport)** for PR 29699 at commit [`a2ed22e`](https://github.com/apache/spark/commit/a2ed22ef8e0c37765a4105b7cd10ad34e1a14651).


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692130886






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692095921


   **[Test build #128657 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128657/testReport)** for PR 29699 at commit [`5628eb2`](https://github.com/apache/spark/commit/5628eb21a4294f686c8cced5cb70d541a12bf24f).


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692114311






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

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] Kimahriman commented on a change in pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487979351



##########
File path: python/pyspark/sql/tests/test_column.py
##########
@@ -139,6 +139,33 @@ def test_bitwise_operations(self):
         result = df.select(functions.bitwiseNOT(df.b)).collect()[0].asDict()
         self.assertEqual(~75, result['~b'])
 
+    def test_with_field(self):

Review comment:
       I updated the test, changing the positive case to match the doc string example, and added TypeError checks for the arguments. Did you want more exception checking beyond that?




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691912708


   ok to test


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-693340578


   Merged to master.
   
   Thanks, @Kimahriman.


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691935344






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691916949


   **[Test build #128637 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128637/testReport)** for PR 29699 at commit [`a2ed22e`](https://github.com/apache/spark/commit/a2ed22ef8e0c37765a4105b7cd10ad34e1a14651).


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

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] Kimahriman commented on a change in pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487976375



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.
+
+        >>> from pyspark.sql import Row, functions
+        >>> df = spark.createDataFrame([Row(a=Row(b=1, c=2))])
+        >>> df.withColumn('a', df['a'].withField('b', functions.lit(3))).select('a.b').show()
+        +---+
+        |  b|
+        +---+
+        |  3|
+        +---+
+        >>> df.withColumn('a', df['a'].withField('d', functions.lit(4))).select('a.d').show()
+        +---+
+        |  d|
+        +---+
+        |  4|
+        +---+
+        """
+        if not isinstance(col, Column):
+            raise TypeError("col should be a Column")
+

Review comment:
       Done

##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.

Review comment:
       Done




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692113664


   **[Test build #128659 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128659/testReport)** for PR 29699 at commit [`7a8b542`](https://github.com/apache/spark/commit/7a8b542c68cb7126b50d4027f934dc181dd5b84d).


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691913021


   **[Test build #128635 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128635/testReport)** for PR 29699 at commit [`a2ed22e`](https://github.com/apache/spark/commit/a2ed22ef8e0c37765a4105b7cd10ad34e1a14651).


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691913733






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-689873371


   Can one of the admins verify this patch?


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487747354



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):

Review comment:
       You should add it into https://github.com/apache/spark/blob/master/python/docs/source/reference/pyspark.sql.rst#dataframe-apis




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691937777






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487744634



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.
+
+        >>> from pyspark.sql import Row, functions
+        >>> df = spark.createDataFrame([Row(a=Row(b=1, c=2))])
+        >>> df.withColumn('a', df['a'].withField('b', functions.lit(3))).select('a.b').show()
+        +---+
+        |  b|
+        +---+
+        |  3|
+        +---+
+        >>> df.withColumn('a', df['a'].withField('d', functions.lit(4))).select('a.d').show()
+        +---+
+        |  d|
+        +---+
+        |  4|
+        +---+
+        """
+        if not isinstance(col, Column):
+            raise TypeError("col should be a Column")
+

Review comment:
       Can you check if `fieldName` is a string as well?




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-689873029


   Can one of the admins verify this patch?


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692113664


   **[Test build #128659 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128659/testReport)** for PR 29699 at commit [`7a8b542`](https://github.com/apache/spark/commit/7a8b542c68cb7126b50d4027f934dc181dd5b84d).


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692118626


   **[Test build #128657 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128657/testReport)** for PR 29699 at commit [`5628eb2`](https://github.com/apache/spark/commit/5628eb21a4294f686c8cced5cb70d541a12bf24f).
    * 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.

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691935344






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-689873371


   Can one of the admins verify this patch?


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691916949


   **[Test build #128637 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128637/testReport)** for PR 29699 at commit [`a2ed22e`](https://github.com/apache/spark/commit/a2ed22ef8e0c37765a4105b7cd10ad34e1a14651).


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-689873029


   Can one of the admins verify this patch?


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

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] Kimahriman commented on a change in pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487994237



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.
+
+        >>> from pyspark.sql import Row, functions

Review comment:
       Actually done this time




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692095921


   **[Test build #128657 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128657/testReport)** for PR 29699 at commit [`5628eb2`](https://github.com/apache/spark/commit/5628eb21a4294f686c8cced5cb70d541a12bf24f).


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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691937777






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691934776


   **[Test build #128637 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128637/testReport)** for PR 29699 at commit [`a2ed22e`](https://github.com/apache/spark/commit/a2ed22ef8e0c37765a4105b7cd10ad34e1a14651).
    * 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.

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692114311






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-691913733






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487985156



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.
+
+        >>> from pyspark.sql import Row, functions

Review comment:
       @Kimahriman, seems you missed this (?).




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

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] Kimahriman commented on a change in pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487874521



##########
File path: python/pyspark/sql/tests/test_column.py
##########
@@ -139,6 +139,33 @@ def test_bitwise_operations(self):
         result = df.select(functions.bitwiseNOT(df.b)).collect()[0].asDict()
         self.assertEqual(~75, result['~b'])
 
+    def test_with_field(self):

Review comment:
       Can you elaborate a little bit on this? Trying to figure out what to add/change. 




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487745762



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.
+
+        >>> from pyspark.sql import Row, functions

Review comment:
       I would import `lit` as:
   
   ```python
   from pyspark.sql.functions import lit
   ```
   




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692119220






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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487746574



##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
                 DeprecationWarning)
         return self[name]
 
+    @since(3.1)
+    def withField(self, fieldName, col):
+        """
+        An expression that adds/replaces field in StructType by name.

Review comment:
       `StructType` -> `` :class:`StructType` ``




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487883751



##########
File path: python/pyspark/sql/tests/test_column.py
##########
@@ -139,6 +139,33 @@ def test_bitwise_operations(self):
         result = df.select(functions.bitwiseNOT(df.b)).collect()[0].asDict()
         self.assertEqual(~75, result['~b'])
 
+    def test_with_field(self):

Review comment:
       Oh I meant, the test cases you added in doctests look good enough as positive cases. So, we can remove this test you added at `test_column.py`.
   
   Instead, I think we can have some tests that check exception types and messages here at `test_column.py`.




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

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] Kimahriman commented on a change in pull request #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487893604



##########
File path: python/pyspark/sql/tests/test_column.py
##########
@@ -139,6 +139,33 @@ def test_bitwise_operations(self):
         result = df.select(functions.bitwiseNOT(df.b)).collect()[0].asDict()
         self.assertEqual(~75, result['~b'])
 
+    def test_with_field(self):

Review comment:
       Gotcha alright




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

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 #29699: [SPARK-32835][PYTHON] Add withField method to the pyspark Column class

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29699:
URL: https://github.com/apache/spark/pull/29699#issuecomment-692130377


   **[Test build #128659 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128659/testReport)** for PR 29699 at commit [`7a8b542`](https://github.com/apache/spark/commit/7a8b542c68cb7126b50d4027f934dc181dd5b84d).
    * 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.

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