-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23329][SQL] Fix documentation of trigonometric functions #20618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0a0c4ae
[SPARK-23329][SQL] Fix documentation of trigonometric functions
misutoth 168d7b3
[SPARK-23329][SQL] Removed unnecessary aligning, reworded inverse fun…
misutoth 2586b0f
[SPARK-23329][SQL] Fixed formatting of long lines, reverted line brea…
misutoth 8550a27
[SPARK-23329][SQL] Make usage text consistent with other docs, revert…
misutoth 40da998
[SPARK-23329][SQL] Formatting finetunings
misutoth 0e4e15a
[SPARK-23329][SQL] Fix documentation of functions.R, functions.scala,…
misutoth fcf1338
[SPARK-23329][SQL] Fixed line length
misutoth 2ea1f18
[SPARK-23329][SQL] Fixed line length of functions.py
misutoth 10afda5
[SPARK-23329][SQL] Fixed python style problem
misutoth 627e204
[SPARK-23329][SQL] Formatting fixes, changed scaladoc references
misutoth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[SPARK-23329][SQL] Removed unnecessary aligning, reworded inverse fun…
…ctions
- Loading branch information
commit 168d7b3715c8ad19b68c9542ffdb90bcb126c312
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1313,78 +1313,75 @@ object functions { | |
| ////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
|
||
| /** | ||
| * @return angle in radians whose cosine is `e`, as if computed by [[java.lang.Math#acos]] | ||
| * @return inverse cosine of `e` in radians, as if computed by [[java.lang.Math#acos]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def acos(e: Column): Column = withExpr { Acos(e.expr) } | ||
|
|
||
| // scalastyle:off line.size.limit | ||
| /** | ||
| * @return angle in radians whose cosine is `columnName` as if computed by [[java.lang.Math#acos]] | ||
| * @return inverse cosine of `columnName`, as if computed by [[java.lang.Math#acos]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def acos(columnName: String): Column = acos(Column(columnName)) | ||
|
|
||
| /** | ||
| * @return angle in radians whose sine is `e`, as if computed by [[java.lang.Math#asin]] | ||
| * @return inverse sine of `e` in radians, as if computed by [[java.lang.Math#asin]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def asin(e: Column): Column = withExpr { Asin(e.expr) } | ||
|
|
||
| /** | ||
| * @return angle in radians whose sine is `columnName`, as if computed by [[java.lang.Math#asin]] | ||
| * @return inverse sine of `columnName`, as if computed by [[java.lang.Math#asin]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def asin(columnName: String): Column = asin(Column(columnName)) | ||
|
|
||
| /** | ||
| * @return angle in radians whose tangent is `e`, as if computed by [[java.lang.Math#atan]] | ||
| * @return inverse tangent of `e`, as if computed by [[java.lang.Math#atan]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def atan(e: Column): Column = withExpr { Atan(e.expr) } | ||
|
|
||
| // scalastyle:off line.size.limit | ||
| /** | ||
| * @return angle in radians whose tangent is `columnName`, as if computed by [[java.lang.Math#atan]] | ||
| * @return inverse tangent of `columnName`, as if computed by [[java.lang.Math#atan]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def atan(columnName: String): Column = atan(Column(columnName)) | ||
|
|
||
| /** | ||
| * | ||
| * @param y coordinate on y-axis | ||
| * @param x coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def atan2(y: Column, x: Column): Column = withExpr { Atan2(y.expr, x.expr) } | ||
|
|
||
| /** | ||
| * @param y coordinate on y-axis | ||
| * @param y coordinate on y-axis | ||
| * @param xName coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1393,12 +1390,12 @@ object functions { | |
|
|
||
| /** | ||
| * @param yName coordinate on y-axis | ||
| * @param x coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * @param x coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1408,11 +1405,11 @@ object functions { | |
| /** | ||
| * @param yName coordinate on y-axis | ||
| * @param xName coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1421,27 +1418,27 @@ object functions { | |
| atan2(Column(yName), Column(xName)) | ||
|
|
||
| /** | ||
| * @param y coordinate on y-axis | ||
| * @param y coordinate on y-axis | ||
| * @param xValue coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def atan2(y: Column, xValue: Double): Column = atan2(y, lit(xValue)) | ||
|
|
||
| /** | ||
| * @param yName coordinate on y-axis | ||
| * @param yName coordinate on y-axis | ||
| * @param xValue coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1450,12 +1447,12 @@ object functions { | |
|
|
||
| /** | ||
| * @param yValue coordinate on y-axis | ||
| * @param x coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * @param x coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1464,12 +1461,12 @@ object functions { | |
|
|
||
| /** | ||
| * @param yValue coordinate on y-axis | ||
| * @param xName coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * @param xName coordinate on x-axis | ||
| * @return the <i>theta</i> component of the point | ||
| * (<i>r</i>, <i>theta</i>) | ||
| * in polar coordinates that corresponds to the point | ||
| * (<i>x</i>, <i>y</i>) in Cartesian coordinates, | ||
| * as if computed by [[java.lang.Math#atan2]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1538,7 +1535,7 @@ object functions { | |
|
|
||
| /** | ||
| * @param e angle in radians | ||
| * @return cosine of the angle, as if computed by [[java.lang.Math#cos]] | ||
| * @return cosine of the angle, as if computed by [[java.lang.Math#cos]] | ||
|
||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1547,7 +1544,7 @@ object functions { | |
|
|
||
| /** | ||
| * @param columnName angle in radians | ||
| * @return cosine of the angle, as if computed by [[java.lang.Math#cos]] | ||
| * @return cosine of the angle, as if computed by [[java.lang.Math#cos]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1556,7 +1553,7 @@ object functions { | |
|
|
||
| /** | ||
| * @param e angle in radians | ||
| * @return hyperbolic cosine of the angle, as if computed by [[java.lang.Math#cosh]] | ||
| * @return hyperbolic cosine of the angle, as if computed by [[java.lang.Math#cosh]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -1565,7 +1562,7 @@ object functions { | |
|
|
||
| /** | ||
| * @param columnName angle in radians | ||
| * @return hyperbolic cosine of the angle, as if computed by [[java.lang.Math#cosh]] | ||
| * @return hyperbolic cosine of the angle, as if computed by [[java.lang.Math#cosh]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -2009,7 +2006,7 @@ object functions { | |
|
|
||
| /** | ||
| * @param e angle in radians | ||
| * @return sine of the angle, as if computed by [[java.lang.Math#sin]] | ||
| * @return sine of the angle, as if computed by [[java.lang.Math#sin]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -2018,7 +2015,7 @@ object functions { | |
|
|
||
| /** | ||
| * @param columnName angle in radians | ||
| * @return sine of the angle, as if computed by [[java.lang.Math#sin]] | ||
| * @return sine of the angle, as if computed by [[java.lang.Math#sin]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -2027,7 +2024,7 @@ object functions { | |
|
|
||
| /** | ||
| * @param e hyperbolic angle | ||
| * @return hyperbolic sine of the given value, as if computed by [[java.lang.Math#sinh]] | ||
| * @return hyperbolic sine of the given value, as if computed by [[java.lang.Math#sinh]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -2036,7 +2033,7 @@ object functions { | |
|
|
||
| /** | ||
| * @param columnName hyperbolic angle | ||
| * @return hyperbolic sine of the given value, as if computed by [[java.lang.Math#sinh]] | ||
| * @return hyperbolic sine of the given value, as if computed by [[java.lang.Math#sinh]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -2045,15 +2042,15 @@ object functions { | |
|
|
||
| /** | ||
| * @param e angle in radians | ||
| * @return tangent of the given value, as if computed by [[java.lang.Math#tan]] | ||
| * @return tangent of the given value, as if computed by [[java.lang.Math#tan]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def tan(e: Column): Column = withExpr { Tan(e.expr) } | ||
|
|
||
| /** | ||
| * @param columnName angle in radians | ||
| * @param columnName angle in radians | ||
| * @return tangent of the given value, as if computed by [[java.lang.Math#tan]] | ||
| * | ||
| * @group math_funcs | ||
|
|
@@ -2063,17 +2060,16 @@ object functions { | |
|
|
||
| /** | ||
| * @param e hyperbolic angle | ||
| * @return hyperbolic tangent of the given value, as if computed by [[java.lang.Math#tanh]] | ||
| * @return hyperbolic tangent of the given value, as if computed by [[java.lang.Math#tanh]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
| */ | ||
| def tanh(e: Column): Column = withExpr { Tanh(e.expr) } | ||
|
|
||
| /** | ||
| * @param columnName hyperbolic angle | ||
| * @return hyperbolic tangent of the given value, | ||
| * as if computed by [[java.lang.Math#tanh]] | ||
| * @param columnName hyperbolic angle | ||
| * @return hyperbolic tangent of the given value, as if computed by [[java.lang.Math#tanh]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 1.4.0 | ||
|
|
@@ -2097,8 +2093,8 @@ object functions { | |
| /** | ||
| * Converts an angle measured in radians to an approximately equivalent angle measured in degrees. | ||
| * | ||
| * @param e angle in radians | ||
| * @return angle in degrees, as if computed by [[java.lang.Math#toDegrees]] | ||
| * @param e angle in radians | ||
| * @return angle in degrees, as if computed by [[java.lang.Math#toDegrees]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 2.1.0 | ||
|
|
@@ -2108,8 +2104,8 @@ object functions { | |
| /** | ||
| * Converts an angle measured in radians to an approximately equivalent angle measured in degrees. | ||
| * | ||
| * @param columnName angle in radians | ||
| * @return angle in degrees, as if computed by [[java.lang.Math#toDegrees]] | ||
| * @param columnName angle in radians | ||
| * @return angle in degrees, as if computed by [[java.lang.Math#toDegrees]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 2.1.0 | ||
|
|
@@ -2133,8 +2129,8 @@ object functions { | |
| /** | ||
| * Converts an angle measured in degrees to an approximately equivalent angle measured in radians. | ||
| * | ||
| * @param e angle in degrees | ||
| * @return angle in radians, as if computed by [[java.lang.Math#toRadians]] | ||
| * @param e angle in degrees | ||
| * @return angle in radians, as if computed by [[java.lang.Math#toRadians]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 2.1.0 | ||
|
|
@@ -2144,8 +2140,8 @@ object functions { | |
| /** | ||
| * Converts an angle measured in degrees to an approximately equivalent angle measured in radians. | ||
| * | ||
| * @param columnName angle in degrees | ||
| * @return angle in radians, as if computed by [[java.lang.Math#toRadians]] | ||
| * @param columnName angle in degrees | ||
| * @return angle in radians, as if computed by [[java.lang.Math#toRadians]] | ||
| * | ||
| * @group math_funcs | ||
| * @since 2.1.0 | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
->. Seems broken in Javadoc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I have removed the non breaking spaces.