-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-28962][SQL][FOLLOW-UP] Add the parameter description for the Scala function API filter #27336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-28962][SQL][FOLLOW-UP] Add the parameter description for the Scala function API filter #27336
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3455,6 +3455,13 @@ object functions { | |
|
||
/** | ||
* Returns an array of elements for which a predicate holds in a given array. | ||
* {{{ | ||
* df.select(filter(col("s"), x => x % 2 === 0)) | ||
* df.selectExpr("filter(col, x -> x % 2 == 0)") | ||
* }}} | ||
* | ||
* @param column: the input array column | ||
* @param f: col => predicate, the boolean predicate to filter the input column | ||
gatorsmile marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* | ||
* @group collection_funcs | ||
* @since 3.0.0 | ||
|
@@ -3465,6 +3472,14 @@ object functions { | |
|
||
/** | ||
* Returns an array of elements for which a predicate holds in a given array. | ||
* {{{ | ||
* df.select(filter(col("s"), (x, i) => i % 2 === 0)) | ||
* df.selectExpr("filter(col, (x, i) -> i % 2 == 0)") | ||
* }}} | ||
* | ||
* @param column: the input array column | ||
* @param f: (col, index) => predicate, the boolean predicate to filter the input column | ||
* given the index. Indices start at 0. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this consistent within Spark that the indices parameter starts with 0 in higher-order functions? @ueshin @HyukjinKwon There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the behavior of presto? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually presto's I remember we had a discussion about the index argument in the PR for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's too late to change now, let's keep using 0. |
||
* | ||
* @group collection_funcs | ||
* @since 3.0.0 | ||
|
Uh oh!
There was an error while loading. Please reload this page.