@@ -206,6 +206,36 @@ object functions {
206
206
// Aggregate functions
207
207
// ////////////////////////////////////////////////////////////////////////////////////////////
208
208
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
+
209
239
/**
210
240
* Aggregate function: returns the approximate number of distinct items in a group.
211
241
*
@@ -1110,6 +1140,27 @@ object functions {
1110
1140
*/
1111
1141
def isnull (e : Column ): Column = withExpr { IsNull (e.expr) }
1112
1142
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
+
1113
1164
/**
1114
1165
* A column expression that generates monotonically increasing 64-bit integers.
1115
1166
*
@@ -2091,6 +2142,20 @@ object functions {
2091
2142
*/
2092
2143
def tanh (columnName : String ): Column = tanh(Column (columnName))
2093
2144
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
+
2094
2159
/**
2095
2160
* Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
2096
2161
*
@@ -2113,6 +2178,20 @@ object functions {
2113
2178
*/
2114
2179
def degrees (columnName : String ): Column = degrees(Column (columnName))
2115
2180
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
+
2116
2195
/**
2117
2196
* Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
2118
2197
*
0 commit comments