Skip to content

Commit 627e204

Browse files
committed
[SPARK-23329][SQL] Formatting fixes, changed scaladoc references
1 parent 10afda5 commit 627e204

File tree

2 files changed

+55
-50
lines changed

2 files changed

+55
-50
lines changed

python/pyspark/sql/functions.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,18 @@ def _():
172172

173173
_functions_2_1 = {
174174
# unary math functions
175-
'degrees': """Converts an angle measured in radians to an approximately equivalent angle
175+
'degrees': """
176+
Converts an angle measured in radians to an approximately equivalent angle
176177
measured in degrees.
177178
:param col: angle in radians
178-
:return: angle in degrees, as if computed by `java.lang.Math.toDegrees()`""",
179-
'radians': """Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
179+
:return: angle in degrees, as if computed by `java.lang.Math.toDegrees()`
180+
""",
181+
'radians': """
182+
Converts an angle measured in degrees to an approximately equivalent angle
183+
measured in radians.
180184
:param col: angle in degrees
181-
:return: angle in radians, as if computed by `java.lang.Math.toRadians()`""",
185+
:return: angle in radians, as if computed by `java.lang.Math.toRadians()`
186+
""",
182187
}
183188

184189
# math functions that take two arguments as input

sql/core/src/main/scala/org/apache/spark/sql/functions.scala

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,47 +1313,47 @@ object functions {
13131313
//////////////////////////////////////////////////////////////////////////////////////////////
13141314

13151315
/**
1316-
* @return inverse cosine of `e` in radians, as if computed by [[java.lang.Math#acos]]
1316+
* @return inverse cosine of `e` in radians, as if computed by `java.lang.Math.acos`
13171317
*
13181318
* @group math_funcs
13191319
* @since 1.4.0
13201320
*/
13211321
def acos(e: Column): Column = withExpr { Acos(e.expr) }
13221322

13231323
/**
1324-
* @return inverse cosine of `columnName`, as if computed by [[java.lang.Math#acos]]
1324+
* @return inverse cosine of `columnName`, as if computed by `java.lang.Math.acos`
13251325
*
13261326
* @group math_funcs
13271327
* @since 1.4.0
13281328
*/
13291329
def acos(columnName: String): Column = acos(Column(columnName))
13301330

13311331
/**
1332-
* @return inverse sine of `e` in radians, as if computed by [[java.lang.Math#asin]]
1332+
* @return inverse sine of `e` in radians, as if computed by `java.lang.Math.asin`
13331333
*
13341334
* @group math_funcs
13351335
* @since 1.4.0
13361336
*/
13371337
def asin(e: Column): Column = withExpr { Asin(e.expr) }
13381338

13391339
/**
1340-
* @return inverse sine of `columnName`, as if computed by [[java.lang.Math#asin]]
1340+
* @return inverse sine of `columnName`, as if computed by `java.lang.Math.asin`
13411341
*
13421342
* @group math_funcs
13431343
* @since 1.4.0
13441344
*/
13451345
def asin(columnName: String): Column = asin(Column(columnName))
13461346

13471347
/**
1348-
* @return inverse tangent of `e`, as if computed by [[java.lang.Math#atan]]
1348+
* @return inverse tangent of `e`, as if computed by `java.lang.Math.atan`
13491349
*
13501350
* @group math_funcs
13511351
* @since 1.4.0
13521352
*/
13531353
def atan(e: Column): Column = withExpr { Atan(e.expr) }
13541354

13551355
/**
1356-
* @return inverse tangent of `columnName`, as if computed by [[java.lang.Math#atan]]
1356+
* @return inverse tangent of `columnName`, as if computed by `java.lang.Math.atan`
13571357
*
13581358
* @group math_funcs
13591359
* @since 1.4.0
@@ -1364,10 +1364,10 @@ object functions {
13641364
* @param y coordinate on y-axis
13651365
* @param x coordinate on x-axis
13661366
* @return the <i>theta</i> component of the point
1367-
* (<i>r</i>,&nbsp;<i>theta</i>)
1367+
* (<i>r</i>, <i>theta</i>)
13681368
* in polar coordinates that corresponds to the point
1369-
* (<i>x</i>,&nbsp;<i>y</i>) in Cartesian coordinates,
1370-
* as if computed by [[java.lang.Math#atan2]]
1369+
* (<i>x</i>, <i>y</i>) in Cartesian coordinates,
1370+
* as if computed by `java.lang.Math.atan2`
13711371
*
13721372
* @group math_funcs
13731373
* @since 1.4.0
@@ -1378,10 +1378,10 @@ object functions {
13781378
* @param y coordinate on y-axis
13791379
* @param xName coordinate on x-axis
13801380
* @return the <i>theta</i> component of the point
1381-
* (<i>r</i>,&nbsp;<i>theta</i>)
1381+
* (<i>r</i>, <i>theta</i>)
13821382
* in polar coordinates that corresponds to the point
1383-
* (<i>x</i>,&nbsp;<i>y</i>) in Cartesian coordinates,
1384-
* as if computed by [[java.lang.Math#atan2]]
1383+
* (<i>x</i>, <i>y</i>) in Cartesian coordinates,
1384+
* as if computed by `java.lang.Math.atan2`
13851385
*
13861386
* @group math_funcs
13871387
* @since 1.4.0
@@ -1392,10 +1392,10 @@ object functions {
13921392
* @param yName coordinate on y-axis
13931393
* @param x coordinate on x-axis
13941394
* @return the <i>theta</i> component of the point
1395-
* (<i>r</i>,&nbsp;<i>theta</i>)
1395+
* (<i>r</i>, <i>theta</i>)
13961396
* in polar coordinates that corresponds to the point
1397-
* (<i>x</i>,&nbsp;<i>y</i>) in Cartesian coordinates,
1398-
* as if computed by [[java.lang.Math#atan2]]
1397+
* (<i>x</i>, <i>y</i>) in Cartesian coordinates,
1398+
* as if computed by `java.lang.Math.atan2`
13991399
*
14001400
* @group math_funcs
14011401
* @since 1.4.0
@@ -1406,10 +1406,10 @@ object functions {
14061406
* @param yName coordinate on y-axis
14071407
* @param xName coordinate on x-axis
14081408
* @return the <i>theta</i> component of the point
1409-
* (<i>r</i>,&nbsp;<i>theta</i>)
1409+
* (<i>r</i>, <i>theta</i>)
14101410
* in polar coordinates that corresponds to the point
1411-
* (<i>x</i>,&nbsp;<i>y</i>) in Cartesian coordinates,
1412-
* as if computed by [[java.lang.Math#atan2]]
1411+
* (<i>x</i>, <i>y</i>) in Cartesian coordinates,
1412+
* as if computed by `java.lang.Math.atan2`
14131413
*
14141414
* @group math_funcs
14151415
* @since 1.4.0
@@ -1421,10 +1421,10 @@ object functions {
14211421
* @param y coordinate on y-axis
14221422
* @param xValue coordinate on x-axis
14231423
* @return the <i>theta</i> component of the point
1424-
* (<i>r</i>,&nbsp;<i>theta</i>)
1424+
* (<i>r</i>, <i>theta</i>)
14251425
* in polar coordinates that corresponds to the point
1426-
* (<i>x</i>,&nbsp;<i>y</i>) in Cartesian coordinates,
1427-
* as if computed by [[java.lang.Math#atan2]]
1426+
* (<i>x</i>, <i>y</i>) in Cartesian coordinates,
1427+
* as if computed by `java.lang.Math.atan2`
14281428
*
14291429
* @group math_funcs
14301430
* @since 1.4.0
@@ -1435,10 +1435,10 @@ object functions {
14351435
* @param yName coordinate on y-axis
14361436
* @param xValue coordinate on x-axis
14371437
* @return the <i>theta</i> component of the point
1438-
* (<i>r</i>,&nbsp;<i>theta</i>)
1438+
* (<i>r</i>, <i>theta</i>)
14391439
* in polar coordinates that corresponds to the point
1440-
* (<i>x</i>,&nbsp;<i>y</i>) in Cartesian coordinates,
1441-
* as if computed by [[java.lang.Math#atan2]]
1440+
* (<i>x</i>, <i>y</i>) in Cartesian coordinates,
1441+
* as if computed by `java.lang.Math.atan2`
14421442
*
14431443
* @group math_funcs
14441444
* @since 1.4.0
@@ -1449,10 +1449,10 @@ object functions {
14491449
* @param yValue coordinate on y-axis
14501450
* @param x coordinate on x-axis
14511451
* @return the <i>theta</i> component of the point
1452-
* (<i>r</i>,&nbsp;<i>theta</i>)
1452+
* (<i>r</i>, <i>theta</i>)
14531453
* in polar coordinates that corresponds to the point
1454-
* (<i>x</i>,&nbsp;<i>y</i>) in Cartesian coordinates,
1455-
* as if computed by [[java.lang.Math#atan2]]
1454+
* (<i>x</i>, <i>y</i>) in Cartesian coordinates,
1455+
* as if computed by `java.lang.Math.atan2`
14561456
*
14571457
* @group math_funcs
14581458
* @since 1.4.0
@@ -1463,10 +1463,10 @@ object functions {
14631463
* @param yValue coordinate on y-axis
14641464
* @param xName coordinate on x-axis
14651465
* @return the <i>theta</i> component of the point
1466-
* (<i>r</i>,&nbsp;<i>theta</i>)
1466+
* (<i>r</i>, <i>theta</i>)
14671467
* in polar coordinates that corresponds to the point
1468-
* (<i>x</i>,&nbsp;<i>y</i>) in Cartesian coordinates,
1469-
* as if computed by [[java.lang.Math#atan2]]
1468+
* (<i>x</i>, <i>y</i>) in Cartesian coordinates,
1469+
* as if computed by `java.lang.Math.atan2`
14701470
*
14711471
* @group math_funcs
14721472
* @since 1.4.0
@@ -1535,7 +1535,7 @@ object functions {
15351535

15361536
/**
15371537
* @param e angle in radians
1538-
* @return cosine of the angle, as if computed by [[java.lang.Math#cos]]
1538+
* @return cosine of the angle, as if computed by `java.lang.Math.cos`
15391539
*
15401540
* @group math_funcs
15411541
* @since 1.4.0
@@ -1544,7 +1544,7 @@ object functions {
15441544

15451545
/**
15461546
* @param columnName angle in radians
1547-
* @return cosine of the angle, as if computed by [[java.lang.Math#cos]]
1547+
* @return cosine of the angle, as if computed by `java.lang.Math.cos`
15481548
*
15491549
* @group math_funcs
15501550
* @since 1.4.0
@@ -1553,7 +1553,7 @@ object functions {
15531553

15541554
/**
15551555
* @param e hyperbolic angle
1556-
* @return hyperbolic cosine of the angle, as if computed by [[java.lang.Math#cosh]]
1556+
* @return hyperbolic cosine of the angle, as if computed by `java.lang.Math.cosh`
15571557
*
15581558
* @group math_funcs
15591559
* @since 1.4.0
@@ -1562,7 +1562,7 @@ object functions {
15621562

15631563
/**
15641564
* @param columnName hyperbolic angle
1565-
* @return hyperbolic cosine of the angle, as if computed by [[java.lang.Math#cosh]]
1565+
* @return hyperbolic cosine of the angle, as if computed by `java.lang.Math.cosh`
15661566
*
15671567
* @group math_funcs
15681568
* @since 1.4.0
@@ -2006,7 +2006,7 @@ object functions {
20062006

20072007
/**
20082008
* @param e angle in radians
2009-
* @return sine of the angle, as if computed by [[java.lang.Math#sin]]
2009+
* @return sine of the angle, as if computed by `java.lang.Math.sin`
20102010
*
20112011
* @group math_funcs
20122012
* @since 1.4.0
@@ -2015,7 +2015,7 @@ object functions {
20152015

20162016
/**
20172017
* @param columnName angle in radians
2018-
* @return sine of the angle, as if computed by [[java.lang.Math#sin]]
2018+
* @return sine of the angle, as if computed by `java.lang.Math.sin`
20192019
*
20202020
* @group math_funcs
20212021
* @since 1.4.0
@@ -2024,7 +2024,7 @@ object functions {
20242024

20252025
/**
20262026
* @param e hyperbolic angle
2027-
* @return hyperbolic sine of the given value, as if computed by [[java.lang.Math#sinh]]
2027+
* @return hyperbolic sine of the given value, as if computed by `java.lang.Math.sinh`
20282028
*
20292029
* @group math_funcs
20302030
* @since 1.4.0
@@ -2033,7 +2033,7 @@ object functions {
20332033

20342034
/**
20352035
* @param columnName hyperbolic angle
2036-
* @return hyperbolic sine of the given value, as if computed by [[java.lang.Math#sinh]]
2036+
* @return hyperbolic sine of the given value, as if computed by `java.lang.Math.sinh`
20372037
*
20382038
* @group math_funcs
20392039
* @since 1.4.0
@@ -2042,7 +2042,7 @@ object functions {
20422042

20432043
/**
20442044
* @param e angle in radians
2045-
* @return tangent of the given value, as if computed by [[java.lang.Math#tan]]
2045+
* @return tangent of the given value, as if computed by `java.lang.Math.tan`
20462046
*
20472047
* @group math_funcs
20482048
* @since 1.4.0
@@ -2051,7 +2051,7 @@ object functions {
20512051

20522052
/**
20532053
* @param columnName angle in radians
2054-
* @return tangent of the given value, as if computed by [[java.lang.Math#tan]]
2054+
* @return tangent of the given value, as if computed by `java.lang.Math.tan`
20552055
*
20562056
* @group math_funcs
20572057
* @since 1.4.0
@@ -2060,7 +2060,7 @@ object functions {
20602060

20612061
/**
20622062
* @param e hyperbolic angle
2063-
* @return hyperbolic tangent of the given value, as if computed by [[java.lang.Math#tanh]]
2063+
* @return hyperbolic tangent of the given value, as if computed by `java.lang.Math.tanh`
20642064
*
20652065
* @group math_funcs
20662066
* @since 1.4.0
@@ -2069,7 +2069,7 @@ object functions {
20692069

20702070
/**
20712071
* @param columnName hyperbolic angle
2072-
* @return hyperbolic tangent of the given value, as if computed by [[java.lang.Math#tanh]]
2072+
* @return hyperbolic tangent of the given value, as if computed by `java.lang.Math.tanh`
20732073
*
20742074
* @group math_funcs
20752075
* @since 1.4.0
@@ -2094,7 +2094,7 @@ object functions {
20942094
* Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
20952095
*
20962096
* @param e angle in radians
2097-
* @return angle in degrees, as if computed by [[java.lang.Math#toDegrees]]
2097+
* @return angle in degrees, as if computed by `java.lang.Math.toDegrees`
20982098
*
20992099
* @group math_funcs
21002100
* @since 2.1.0
@@ -2105,7 +2105,7 @@ object functions {
21052105
* Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
21062106
*
21072107
* @param columnName angle in radians
2108-
* @return angle in degrees, as if computed by [[java.lang.Math#toDegrees]]
2108+
* @return angle in degrees, as if computed by `java.lang.Math.toDegrees`
21092109
*
21102110
* @group math_funcs
21112111
* @since 2.1.0
@@ -2130,7 +2130,7 @@ object functions {
21302130
* Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
21312131
*
21322132
* @param e angle in degrees
2133-
* @return angle in radians, as if computed by [[java.lang.Math#toRadians]]
2133+
* @return angle in radians, as if computed by `java.lang.Math.toRadians`
21342134
*
21352135
* @group math_funcs
21362136
* @since 2.1.0
@@ -2141,7 +2141,7 @@ object functions {
21412141
* Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
21422142
*
21432143
* @param columnName angle in degrees
2144-
* @return angle in radians, as if computed by [[java.lang.Math#toRadians]]
2144+
* @return angle in radians, as if computed by `java.lang.Math.toRadians`
21452145
*
21462146
* @group math_funcs
21472147
* @since 2.1.0

0 commit comments

Comments
 (0)