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/03 06:02:06 UTC

[GitHub] [spark] yutoacts opened a new pull request #33906: [SPARK-36660][SQL] Support COT by Dataframe operations

yutoacts opened a new pull request #33906:
URL: https://github.com/apache/spark/pull/33906


   <!--
   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'.
   -->
   
   ### 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.
   -->
   Add cotangent support in Dataframe operations (e.g. `df.select(cot($"col"))`).
   
   ### 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.
   -->
   Cotangent has been supported by Spark SQL since 2.3.0 but it cannot be called by Dataframe operations.
   
   ### 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, users can now call the cotangent function by Dataframe operations.
   
   ### 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.
   -->
   unit tests.


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47469/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47469/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -377,6 +377,23 @@ def cosh(col):
     return _invoke_function_over_column("cosh", col)
 
 
+def cot(col):

Review comment:
       actually you should also add them in functions.R too. ref: https://github.com/apache/spark/commit/aeb45df668a97a2d48cfd4079ed62601390979ba




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   I am fine with them.


-- 
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] yutoacts commented on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Thank you. I'll post the new ticket and start working on them.


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #142972 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142972/testReport)** for PR 33906 at commit [`c142527`](https://github.com/apache/spark/commit/c1425274409ff209377298b728f4ddec5b35ca1a).


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Yup


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #143006 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143006/testReport)** for PR 33906 at commit [`a4ec1e1`](https://github.com/apache/spark/commit/a4ec1e1f6f605f19ec3740faf0d6678bfc7b17d9).


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47469/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }

Review comment:
       Yeah, read the guides on the top of f functions.scala




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   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.

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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #142969 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142969/testReport)** for PR 33906 at commit [`ee170d6`](https://github.com/apache/spark/commit/ee170d6162125c566fca88b9628aab681378ed17).


-- 
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] yutoacts commented on pull request #33906: [SPARK-36660][SQL] Support COT by Dataframe operations

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


   cc @wangyum 


-- 
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] yutoacts commented on a change in pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -377,6 +377,23 @@ def cosh(col):
     return _invoke_function_over_column("cosh", col)
 
 
+def cot(col):

Review comment:
       https://github.com/apache/spark/pull/33925




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.3.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }
+
+  /**
+   * @param columnName angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(columnName: String): Column = cot(Column(columnName))

Review comment:
       Mind removing this one? Looks fine otherwise




-- 
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] yutoacts commented on a change in pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }

Review comment:
       oh, thank you I just removed it.




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47473/
   


-- 
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] yutoacts commented on a change in pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }

Review comment:
       Thanks for the review. I saw other trig functions accept both `Column` and `String(columnName)` but is it not recommended to be used?




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #143006 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143006/testReport)** for PR 33906 at commit [`a4ec1e1`](https://github.com/apache/spark/commit/a4ec1e1f6f605f19ec3740faf0d6678bfc7b17d9).
    * This patch **fails Spark 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] HyukjinKwon commented on a change in pull request #33906: [SPARK-36660][SQL] Support COT by Dataframe operations

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }

Review comment:
       Let's only add this one (`Column` only). 

##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0

Review comment:
       3.3.0




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47508/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/142969/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47473/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -377,6 +377,23 @@ def cosh(col):
     return _invoke_function_over_column("cosh", col)
 
 
+def cot(col):

Review comment:
       this is fine. usually SparkR one is done separately in a separate JIRA.




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47469/
   


-- 
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] yutoacts commented on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   BTW noticed that cosecant and secant are missing. Though they are just the reciprocals of sin and cos, I feel a bit odd that only cot is supported.


-- 
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 #33906: [SPARK-36660][SQL] Support COT by Dataframe operations

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0

Review comment:
       ```suggestion
      * @since 3.3.0
   ```




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   I am okay with this.
   cc @zero323, @WeichenXu123 and @srowen FYI


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47473/
   


-- 
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] yutoacts commented on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   I mentioned before but how about implementing SEC/CSC? I believe they can be used as much as COT.


-- 
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] yutoacts commented on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Thank you, I just added to it.


-- 
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 #33906: [SPARK-36660][SQL] Support COT by Dataframe operations

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -377,6 +377,23 @@ def cosh(col):
     return _invoke_function_over_column("cosh", col)
 
 
+def cot(col):
+    """
+    .. versionadded:: 3.2.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        angle in radians

Review comment:
       ```suggestion
           Angle in radians
   ```

##########
File path: python/pyspark/sql/functions.py
##########
@@ -377,6 +377,23 @@ def cosh(col):
     return _invoke_function_over_column("cosh", col)
 
 
+def cot(col):
+    """
+    .. versionadded:: 3.2.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        angle in radians
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        cotangent of the angle.

Review comment:
       ```suggestion
           Cotangent of the angle.
   ```

##########
File path: python/pyspark/sql/functions.py
##########
@@ -377,6 +377,23 @@ def cosh(col):
     return _invoke_function_over_column("cosh", col)
 
 
+def cot(col):
+    """
+    .. versionadded:: 3.2.0

Review comment:
       ```suggestion
       .. versionadded:: 3.3.0
   ```




-- 
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 closed pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   


-- 
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] yutoacts commented on a change in pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }

Review comment:
       Thanks for the review. I saw other trig functions accept both `Column` and `String(columnName)`. Is `columnName` not recommended to be used?




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   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.

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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #142969 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142969/testReport)** for PR 33906 at commit [`ee170d6`](https://github.com/apache/spark/commit/ee170d6162125c566fca88b9628aab681378ed17).
    * 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] SparkQA removed a comment on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #142972 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142972/testReport)** for PR 33906 at commit [`c142527`](https://github.com/apache/spark/commit/c1425274409ff209377298b728f4ddec5b35ca1a).


-- 
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 #33906: [SPARK-36660][SQL] Support COT by Dataframe operations

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


   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.

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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Merged 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 commented on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #143006 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143006/testReport)** for PR 33906 at commit [`a4ec1e1`](https://github.com/apache/spark/commit/a4ec1e1f6f605f19ec3740faf0d6678bfc7b17d9).


-- 
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] wangyum commented on pull request #33906: [SPARK-36660][SQL] Support COT by Dataframe operations

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


   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 commented on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47473/
   


-- 
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] yutoacts commented on a change in pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }

Review comment:
       Thanks for the review. I saw other trig functions accept both `Column` and `String(columnName)`. Should we not use `columnName` for the parameter?




-- 
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] zero323 commented on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   The arguments here are the same as for SPARK-33061 (#29938). so if we've added those, this one should be fine 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.

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] sarutak commented on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   We need to change `python/docs/source/reference/pyspark.sql.rst` for `cot` right?


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143006/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143006/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   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.

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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/142969/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47508/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #142969 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142969/testReport)** for PR 33906 at commit [`ee170d6`](https://github.com/apache/spark/commit/ee170d6162125c566fca88b9628aab681378ed17).


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   **[Test build #142972 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/142972/testReport)** for PR 33906 at commit [`c142527`](https://github.com/apache/spark/commit/c1425274409ff209377298b728f4ddec5b35ca1a).
    * 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] AmplabJenkins removed a comment on pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47508/
   


-- 
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] yutoacts commented on a change in pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }

Review comment:
       Thanks for the review. I saw other trig functions accept both `Column` and `String(columnName)`. but is `columnName` not recommended to be used?




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/142972/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   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.

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] yutoacts commented on a change in pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -377,6 +377,23 @@ def cosh(col):
     return _invoke_function_over_column("cosh", col)
 
 
+def cot(col):

Review comment:
       Sorry, I forgot about that. I'm pushing the follow-up PR soon.




-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47508/
   


-- 
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 #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/142972/
   


-- 
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] yutoacts commented on a change in pull request #33906: [SPARK-36660][SQL] Add cot as Scala and Python functions

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
##########
@@ -1800,6 +1800,24 @@ object functions {
    */
   def cosh(columnName: String): Column = cosh(Column(columnName))
 
+  /**
+   * @param e angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.3.0
+   */
+  def cot(e: Column): Column = withExpr { Cot(e.expr) }
+
+  /**
+   * @param columnName angle in radians
+   * @return cotangent of the angle
+   *
+   * @group math_funcs
+   * @since 3.2.0
+   */
+  def cot(columnName: String): Column = cot(Column(columnName))

Review comment:
       Thanks for the reminder. I just removed it.




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