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