Skip to content

Commit 706c3d0

Browse files
author
Robert Kruszewski
committed
Resotre renamed functions
1 parent 169d326 commit 706c3d0

File tree

3 files changed

+81
-4
lines changed

3 files changed

+81
-4
lines changed

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
<module>external/avro</module>
108108
<module>dists/hadoop-palantir-bom</module>
109109
<module>dists/hadoop-palantir</module>
110+
<module>resource-managers/kubernetes/core</module>
111+
<module>resource-managers/kubernetes/integration-tests</module>
110112
<!-- See additional modules enabled by profiles below -->
111113
</modules>
112114

project/MimaExcludes.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ object MimaExcludes {
4141
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.executor.ShuffleWriteMetrics.shuffleWriteTime"),
4242
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.executor.ShuffleWriteMetrics.shuffleRecordsWritten"),
4343
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.scheduler.AccumulableInfo.apply"),
44-
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.functions.approxCountDistinct"),
45-
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.functions.toRadians"),
46-
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.functions.toDegrees"),
47-
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.functions.monotonicallyIncreasingId"),
4844
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.SQLContext.clearActive"),
4945
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.SQLContext.getOrCreate"),
5046
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.SQLContext.setActive"),

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

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,36 @@ object functions {
206206
// Aggregate functions
207207
//////////////////////////////////////////////////////////////////////////////////////////////
208208

209+
/**
210+
* @group agg_funcs
211+
* @since 1.3.0
212+
*/
213+
@deprecated("Use approx_count_distinct", "2.1.0")
214+
def approxCountDistinct(e: Column): Column = approx_count_distinct(e)
215+
216+
/**
217+
* @group agg_funcs
218+
* @since 1.3.0
219+
*/
220+
@deprecated("Use approx_count_distinct", "2.1.0")
221+
def approxCountDistinct(columnName: String): Column = approx_count_distinct(columnName)
222+
223+
/**
224+
* @group agg_funcs
225+
* @since 1.3.0
226+
*/
227+
@deprecated("Use approx_count_distinct", "2.1.0")
228+
def approxCountDistinct(e: Column, rsd: Double): Column = approx_count_distinct(e, rsd)
229+
230+
/**
231+
* @group agg_funcs
232+
* @since 1.3.0
233+
*/
234+
@deprecated("Use approx_count_distinct", "2.1.0")
235+
def approxCountDistinct(columnName: String, rsd: Double): Column = {
236+
approx_count_distinct(Column(columnName), rsd)
237+
}
238+
209239
/**
210240
* Aggregate function: returns the approximate number of distinct items in a group.
211241
*
@@ -1110,6 +1140,27 @@ object functions {
11101140
*/
11111141
def isnull(e: Column): Column = withExpr { IsNull(e.expr) }
11121142

1143+
/**
1144+
* A column expression that generates monotonically increasing 64-bit integers.
1145+
*
1146+
* The generated ID is guaranteed to be monotonically increasing and unique, but not consecutive.
1147+
* The current implementation puts the partition ID in the upper 31 bits, and the record number
1148+
* within each partition in the lower 33 bits. The assumption is that the data frame has
1149+
* less than 1 billion partitions, and each partition has less than 8 billion records.
1150+
*
1151+
* As an example, consider a `DataFrame` with two partitions, each with 3 records.
1152+
* This expression would return the following IDs:
1153+
*
1154+
* {{{
1155+
* 0, 1, 2, 8589934592 (1L << 33), 8589934593, 8589934594.
1156+
* }}}
1157+
*
1158+
* @group normal_funcs
1159+
* @since 1.4.0
1160+
*/
1161+
@deprecated("Use monotonically_increasing_id()", "2.0.0")
1162+
def monotonicallyIncreasingId(): Column = monotonically_increasing_id()
1163+
11131164
/**
11141165
* A column expression that generates monotonically increasing 64-bit integers.
11151166
*
@@ -2091,6 +2142,20 @@ object functions {
20912142
*/
20922143
def tanh(columnName: String): Column = tanh(Column(columnName))
20932144

2145+
/**
2146+
* @group math_funcs
2147+
* @since 1.4.0
2148+
*/
2149+
@deprecated("Use degrees", "2.1.0")
2150+
def toDegrees(e: Column): Column = degrees(e)
2151+
2152+
/**
2153+
* @group math_funcs
2154+
* @since 1.4.0
2155+
*/
2156+
@deprecated("Use degrees", "2.1.0")
2157+
def toDegrees(columnName: String): Column = degrees(Column(columnName))
2158+
20942159
/**
20952160
* Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
20962161
*
@@ -2113,6 +2178,20 @@ object functions {
21132178
*/
21142179
def degrees(columnName: String): Column = degrees(Column(columnName))
21152180

2181+
/**
2182+
* @group math_funcs
2183+
* @since 1.4.0
2184+
*/
2185+
@deprecated("Use radians", "2.1.0")
2186+
def toRadians(e: Column): Column = radians(e)
2187+
2188+
/**
2189+
* @group math_funcs
2190+
* @since 1.4.0
2191+
*/
2192+
@deprecated("Use radians", "2.1.0")
2193+
def toRadians(columnName: String): Column = radians(Column(columnName))
2194+
21162195
/**
21172196
* Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
21182197
*

0 commit comments

Comments
 (0)