File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
sql/core/src/main/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -3456,9 +3456,11 @@ object functions {
3456
3456
/**
3457
3457
* Returns an array of elements for which a predicate holds in a given array.
3458
3458
* {{{
3459
+ * df.select(filter(col("s"), x -> x % 2 === 0))
3459
3460
* df.selectExpr("filter(col, x -> x % 2 == 0)")
3460
3461
* }}}
3461
3462
*
3463
+ * @param column: the input array column
3462
3464
* @param f: col => predicate, the boolean predicate to filter the input column
3463
3465
*
3464
3466
* @group collection_funcs
@@ -3471,9 +3473,11 @@ object functions {
3471
3473
/**
3472
3474
* Returns an array of elements for which a predicate holds in a given array.
3473
3475
* {{{
3476
+ * df.select(filter(col("s"), (x, i) => i % 2 === 0))
3474
3477
* df.selectExpr("filter(col, (x, i) -> i % 2 == 0)")
3475
3478
* }}}
3476
3479
*
3480
+ * @param column: the input array column
3477
3481
* @param f: (col, index) => predicate, the boolean predicate to filter the input column
3478
3482
* given the index. Indices start at 0.
3479
3483
*
You can’t perform that action at this time.
0 commit comments